WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. melanie71
    Member
    Posted 4 months 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. wpsmort
    Member
    Posted 4 months ago #

    Hi Melanie,

    Can you provide the URL for your store page.

  3. melanie71
    Member
    Posted 4 months ago #

  4. Peter Baylies
    Member
    Plugin Author

    Posted 4 months 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 4 months ago #

    Thank you!

Reply

You must log in to post.

About this Plugin

About this Topic