Tagged: x
-
AuthorPosts
-
September 2, 2016 at 6:55 am #1158351
JPParticipanthi – is it possible to have category specific text show up on top of results for that category.
I know how to add text above results by editing child functions.php but can i create custom text for each catageory?
myeternalbeauty.com
Thanks very much!
September 2, 2016 at 10:57 am #1158590
RahulModeratorHey There,
Thanks for writing in!
Are you talking about the Category Archive Text?
Thanks.
September 5, 2016 at 4:18 am #1161354
JPParticipantpossibly – i added the below code to functions.php in child theme and the the text shows up
on the shop page: http://myeternalbeauty.com/shop/
but also on any category page, such as: http://myeternalbeauty.com/product-category/acne/
I was wondering if I could customise the text per category. If so could you show me an example code?
‘
// add text to top of shop resultsfunction add_shop_extra(){
echo ‘<h5 class=”man”>Maecenas consectetur quam a lacinia efficitur. Proin placerat felis id ipsum consectetur, eu venenatis mi consectetur. Vivamus luctus sollicitudin leo vitae condimentum.</h5><br><br>’;
}
add_action(‘woocommerce_before_shop_loop’, ‘add_shop_extra’);
‘Thanks!
September 5, 2016 at 4:47 am #1161385
ChristopherModeratorHi there,
Yes, it’s possible.
Please try this code :
function add_shop_extra(){ if (is_product_category('acne')){ echo '<h5 class="man">Maecenas consectetur quam a lacinia efficitur. Proin placerat felis id ipsum consectetur, eu venenatis mi consectetur. Vivamus luctus sollicitudin leo vitae condimentum.</h5><br><br>'; } } add_action('woocommerce_before_shop_loop', 'add_shop_extra');Instead of
acneput archive name.Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1158351 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
