Tagged: x
-
AuthorPosts
-
May 4, 2016 at 5:23 pm #913338
jbillhParticipantHey Guys,
First off, thank you very much for your time and patience. What I’d like to accomplish is shown in the attachment; I’d like to put an image below the top menu bar on a shop/product listing that, when clicked, takes you to another shop page. In this scenario, I would have 4 small thumbnail-size images, one of which would take me to the accessories page or something. Let me know if you need anything from me or have any questions.
Thanks Much,
Adam
May 4, 2016 at 10:54 pm #913718
FriechModeratorHi Adam,
Thanks for writing in! Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Cheers!
May 5, 2016 at 11:53 am #914558
jbillhParticipantThis reply has been marked as private.May 5, 2016 at 9:41 pm #978060
FriechModeratorHi Adam,
You can add this to your child theme’s functions.php file.
function custom_header() { if(is_woocommerce()): ?> <div class="custom-header mtl"> <div class="x-container max width"> <div class="x-column x-sm x-1-1"> <ul class="x-block-grid four-up"> <li class="x-block-grid-item"> <a href="#"><img src="YOUR THUMBNAIL IMAGE URL HERE" alt="some alternate text here" /></a> </li> <li class="x-block-grid-item"> <a href="#"><img src="YOUR THUMBNAIL IMAGE URL HERE" alt="some alternate text here" /></a> </li> <li class="x-block-grid-item"> <a href="#"><img src="YOUR THUMBNAIL IMAGE URL HERE" alt="some alternate text here" /></a> </li> <li class="x-block-grid-item"> <a href="#"><img src="YOUR THUMBNAIL IMAGE URL HERE" alt="some alternate text here" /></a> </li> </ul> </div> </div> </div> <?php endif; } add_action('x_after_view_global__navbar','custom_header', 30);I did wrap it with a x-block-grid-item class so it would be responsive. Replace the YOUR THUMBNAIL IMAGE URL HERE string with your actual image URL and replace the # with the link where you want to be that image to be directed.
Hope it helps, Cheers!
May 10, 2016 at 3:42 pm #984753
jbillhParticipantHey Friech,
First off, thank you very much for taking the time to write that code for me.
Is there any way for me to specify which pages/products this function will show up on? We’d like it to show up on (4) or (5) separate product pages and nowhere else.
Thanks So Much,
Adam
May 11, 2016 at 12:43 am #985356
Paul RModeratorHi Adam,
Yes, it’s possible.
You may change this line
if(is_woocommerce()): ?>to this
if(is_woocommerce() && get_the_ID() == 1): ?>Change 1 with your product id
https://support.woothemes.com/hc/en-us/articles/203054126-How-to-Find-a-WooCommerce-Product-ID
Hope that helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-913338 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
