Archived topic
WooCommerce categories title and description missing
13 replies · Started by Alvaro on December 23, 2019
Good morning,
I have been using Twentyseventeen theme for my online redshirts shop to which I made some CSS adjustments in order to make it looks better.
Now I have installed GP premium on it and everything good but for one thing.
I have used the WooCommerce product categories as pages some of which I have strongly positioned on serps for plenty of keywords (using title and description of the category under the products). But on GP both Title and description are missing for product categories and tags.
I have no idea about PHP or almost anything but SEO, so I would be happy if you could help me with that
I have the same problem.
Have you found any temporal solution?
One of the categories is my top ranked page
Hi there,
Can you confirm that Display page title checked in the customizer?
https://docs.generatepress.com/article/woocommerce-overview/#shop
Make sure to clear your caching plugins.
In the main shop there is not any problem, the issue is at the category and tag product pages.
https://ratslab.es/donde-comprar/moda-ropa-streetwear/camisetas-ecologicas/
With another themes the category name and category description are displayed under the products which belong to it, but not with GP
If Display Page Title (as Leo mentioned above) is checked, it should work.
If not, add this CSS as well:
.tax-product_cat .woocommerce-products-header {
display: block;
}
Still not working, have enabled "title page" and also added that CSS bus still doesn't appear.
Have also been checking elements but there is no one which could be causing that.
Looking at the site library I see no one with WooCommerce which have the description or title on product category pages, so might be something about the main theme, and not about its configuration
I actually imported and tested with Seller from our library and the title and description is indeed showing after checking the option in the customizer:
https://wordpress-202309-991531.cloudwaysapps.com/product-category/hoodies/
Any chance you can try disabling all plugins except GP Premium and WooCommerce to eliminate any unknown conflicts?
Thanks :)
Solved. Thank you very much for the help.
Actually it was a piece of personalized css which came with the site library thee I chose.
I had been realing It but should have not seen that part.
Now I am trying to move description below the products
I have found tht code:
add_action('woocommerce_archive_description', 'custom_archive_description', 2 );
function custom_archive_description(){
if( is_product_category() ) :
remove_action('woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
add_action( 'woocommerce_after_main_content', 'woocommerce_taxonomy_archive_description', 5 );
endif;
}
I have seem someone who made it work but for now the attempt I have done has been to paste it on a elment hook without exit. Could you tell me where or how might I paste it?
Anyway thank you very very much for the patience, help and support.
And Merry Christmas!
That code needs to be added with this method:
Adding PHP: https://docs.generatepress.com/article/adding-php/
Wouldn't it be easier to do that using hook elements of the theme?
No. It has to be one of the methods I linked above.
Otherwise I wouldn't have suggested it.
Actually I introduced it as a PHP fuction enabling it on the element hook which works webwide and is working.
I saw it on another forum.
The element hooks have to option to display shortcodes and PHP.
But I don't know it that could cause any issue or something
Hooks aren't supposed to be used for that - it is meant to add content to specific section to your site.
Feel free to use it if it works for you - I can't guaranteed that there won't be unknown any issues.
Our recommendation would be to use one of the methods I linked above.