WordPress.org

Forums

All in One SEO Pack
[resolved] WooCommerce Title for Shop Page (5 posts)

  1. melanie71
    Member
    Posted 1 year ago #

    Hi - how do you set the Title, Meta Description and Keywords for a WooCommerce Shop page using 'All in One SEO Pack'? I have entered information as I would for any other WordPress page, but Title just displays "Product".

    https://wordpress.org/plugins/all-in-one-seo-pack/

  2. Hi Melanie,

    Can you provide the URL for your store page.

  3. melanie71
    Member
    Posted 1 year ago #

  4. Peter Baylies
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Melanie,

    The issue here is that WooCommerce makes the Shop page into its own product archive page; once it does this, All In One SEO Pack can no longer tell what the page was, which is why it isn't able to display your title. Currently, you can customize this by adding a bit of code to your functions.php in your theme or to a plugin, like so:

    add_filter( 'aioseop_title', 'melanie_woocommerce_title'  );
    function melanie_woocommerce_title( $title ) {
    	if ( is_post_type_archive( 'product' ) ) {
    		return "My Product Page";
    	}
    	return $title;
    }
    
    add_filter( 'aioseop_description', 'melanie_woocommerce_description'  );
    function melanie_woocommerce_description( $description ) {
    	if ( is_post_type_archive( 'product' ) ) {
    		return "My Product Page Description";
    	}
    	return $description;
    }
  5. melanie71
    Member
    Posted 1 year ago #

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • All in One SEO Pack
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic