Tagged: x
-
AuthorPosts
-
January 5, 2017 at 8:33 pm #1318296
uptownenergyParticipantI’m wondering if it’s possible to insert additional links within the same <div> as the breadcrumbs?
For example, if I wanted to put a link to the shopping cart on the far right side of the page while the breadcrumbs stay on the far left.
January 5, 2017 at 8:34 pm #1318301
uptownenergyParticipantThis reply has been marked as private.January 5, 2017 at 11:58 pm #1318434
RupokMemberHi there,
Thanks for writing in! It’s not usually possible but I can give you a tricky solution.
You can add this under Custom > CSS in the Customizer.jQuery(document).ready(function($) { var html = '<div class="my-links"><a href="#">Your Link here</a></div>>'; $( html ).appendTo('.x-breadcrumb-wrap > .x-container'); });You can add the content within the div and style with the .my-links class.
Cheers!
January 16, 2017 at 2:03 pm #1332498
uptownenergyParticipantHi Rupok,
Thanks for the code, but it doesn’t seem to be working. I copy/paste-ed it into my Global CSS Customizer but I don’t see the link. I’m assuming that the code “as-is” should at least create the text “Your Link here” with a hyperlink that doesn’t go anywhere, but I don’t see the text on the page.
-Mike
January 16, 2017 at 9:07 pm #1332977
FriechModeratorHi Mike,
Lets do a different approach, please navigate to your child theme’s \x-child\framework\views\integrity\ directory. There create a file named _breadcrumbs.php and paste the code below on it.
<?php // ============================================================================= // VIEWS/INTEGRITY/_BREADCRUMBS.PHP // ----------------------------------------------------------------------------- // Breadcrumb output for Integrity. // ============================================================================= ?> <?php if ( ! is_front_page() ) : ?> <?php if ( x_get_option( 'x_breadcrumb_display' ) == '1' ) : ?> <div class="x-breadcrumb-wrap"> <div class="x-container max width"> <?php x_breadcrumbs(); ?> <div class="custom-links right"><a href="#">Your Link here</a></div> <?php if ( is_single() || x_is_portfolio_item() ) : ?> <?php x_entry_navigation(); ?> <?php endif; ?> </div> </div> <?php endif; ?> <?php endif; ?>Replace the # with your actual link URL, and the text Your Link here with your actual text.
Hope it helps, Cheers!
January 21, 2017 at 10:52 am #1339716
uptownenergyParticipantHi Friech,
Thanks for the code, it worked like a charm and I can now put a text link next to the breadcrumb div.
Is there a way for me to use icons in the new custom link? I tried the [x_icon] shortcode, but it doesn’t seem to be interpreting that.
Thanks,
MikeJanuary 21, 2017 at 5:34 pm #1339955
Rue NelModeratorHello Mike,
Thanks for updating in! If you want to add a shortcode icon, please use this code instead:
<div class="custom-links right"><a href="#"><?php do_shortcode('[x_icon type="globe"]'); ?> Your Link here</a></div>Hope this helps. Kindly let us know.
January 23, 2017 at 9:04 am #1341569
uptownenergyParticipantHi Rue Nel,
Unfortunately that code did not work. It is not displaying the icon.
-Mike
January 23, 2017 at 10:16 am #1341694
RupokMemberHi Mike,
Thanks for writing back. It should work fine. Can you make sure your whole code looks like this? :
<?php // ============================================================================= // VIEWS/INTEGRITY/_BREADCRUMBS.PHP // ----------------------------------------------------------------------------- // Breadcrumb output for Integrity. // ============================================================================= ?> <?php if ( ! is_front_page() ) : ?> <?php if ( x_get_option( 'x_breadcrumb_display' ) == '1' ) : ?> <div class="x-breadcrumb-wrap"> <div class="x-container max width"> <?php x_breadcrumbs(); ?> <div class="custom-links right"><a href="#"><?php do_shortcode('[x_icon type="globe"]'); ?> Your Link here</a></div> <?php if ( is_single() || x_is_portfolio_item() ) : ?> <?php x_entry_navigation(); ?> <?php endif; ?> </div> </div> <?php endif; ?> <?php endif; ?>If it still doesn’t work, you can try this? :
<?php // ============================================================================= // VIEWS/INTEGRITY/_BREADCRUMBS.PHP // ----------------------------------------------------------------------------- // Breadcrumb output for Integrity. // ============================================================================= ?> <?php if ( ! is_front_page() ) : ?> <?php if ( x_get_option( 'x_breadcrumb_display' ) == '1' ) : ?> <div class="x-breadcrumb-wrap"> <div class="x-container max width"> <?php x_breadcrumbs(); ?> <div class="custom-links right"><a href="#"><i class="x-icon x-icon-globe" data-x-icon="" aria-hidden="true"></i> Your Link here</a></div> <?php if ( is_single() || x_is_portfolio_item() ) : ?> <?php x_entry_navigation(); ?> <?php endif; ?> </div> </div> <?php endif; ?> <?php endif; ?>Let us know how it goes.
January 23, 2017 at 11:03 am #1341767
uptownenergyParticipantHi Rupok,
The second piece of code did the trick! How do I change the icon though? I tried changing x-icon-globe to x-icon-shopping_cart, but the globe icon remains.
Thanks,
MikeJanuary 23, 2017 at 11:37 am #1341825
RupokMemberHi Mike,
Glad to hear that. Let’s use this to use shopping cart icon :
<i class="x-icon x-icon-shopping-cart" data-x-icon="" aria-hidden="true"></i>Cheers!
January 23, 2017 at 12:08 pm #1341870
uptownenergyParticipantHi Rupok,
That new entry did the job. Is there some data in the little square icon? Whenever I tried just modifying the icon name (as mentioned before) it didn’t seem to change on its own.
Either way, I’m satisfied with the results. Thanks again for the help.
-Mike
January 23, 2017 at 12:37 pm #1341905
RupokMemberHi Mike,
Yes that’s attribute and it’s necessary. For your future reference, here’s how I did it. Go to the Icons shortcode page – http://demo.theme.co/integrity-1/shortcodes/icons/
Then right click on the icon you want and click “Inspect Element”. Then “Copy HTML” – http://prntscr.com/dzddzu
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1318296 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
