Tagged: Shop Page
-
AuthorPosts
-
November 5, 2015 at 2:37 pm #530791
Hello there,
I have a question about our shop pages – surely you can help me:
at the following URL you see a category page of our shopI managed to include and display some text before the product section. Now I would need to include an additional text section (with slightly more text) below the product section of the shop page but before the footer. (this is basically a need for my SEO optimization and should be a customer benefit with explanations and so on as well).
Please can you tell me how to include this text between the product section and the footer.
Many thanks
WernerNovember 5, 2015 at 4:19 pm #530901Hi steinobert!
It looks like you forgot the link to your page.
I think what you will need to do though is add it around line 90 in the archive.php template.
You can use this conditional check to see if it’s a product archive page.
<?php if ( is_product_category() ) { echo 'some extra text'; } ?>
Regards,
ElliottNovember 5, 2015 at 5:52 pm #531030http://www.sheela.cc/shop/produktkategorie/damen/damenschuerzen/
this should be the missing link, sorry.
is your solution still valid for this?
thanks and kind regards
WernerNovember 5, 2015 at 6:31 pm #531073Hey!
Yes, go ahead and try it out.
Regards,
ElliottNovember 6, 2015 at 1:46 pm #531429thanks, my partner will try that this afternoon as she is more familiar with php.
question for my understanding:
does this add an extra field an all category pages (after products listing but before footer) which can be filled with additional text, headlines and so on. the text and headlines need to be individual per category.
thanks
WernerNovember 7, 2015 at 12:02 am #531683hi Elliott,
we just tried that but it doesn’t work.
Do you have any other solution/advice or solution also regarding my last post?
thx
WernerNovember 9, 2015 at 4:57 am #532311Hey!
Please try this code in the functions.php file instead:
add_action('woocommerce_after_shop_loop', function() { echo "Something here"; });
Use the is_tax conditional function: https://codex.wordpress.org/Function_Reference/is_tax
add_action('woocommerce_after_shop_loop', function() { if(is_tax('product_cat')) { echo "Something here"; } });
Cheers!
IsmaelNovember 12, 2015 at 6:48 pm #535002thanks, we will try that asap and will update you.
WernerNovember 13, 2015 at 7:39 am #535251 -
AuthorPosts
- You must be logged in to reply to this topic.