• Resolved qzya

    (@qzya)


    Hello I use this plugin with WP+woocommerce. Is it posible to get auto generated SEO description from post area (where woocommerce stores large description), not from short description for products?
    Thanks for this simple but powerfull plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi, qzay ??

    It’s possible, but I currently don’t recommend it. I’m amidst improving the code flow and options for titles and descriptions for the next update, and I’m going to introduce better methods to achieve what you want.

    If you still wish to continue, I think this (untested!!) snippet will work for now:

    add_filter( 'the_seo_framework_fetched_description_excerpt', function( $excerpt, $page_id ) {
    	if ( the_seo_framework()->is_wc_product() ) {
    		$product = get_post( $page_id );
    		$excerpt = ! empty( $product->post_content )
    				 ? ( the_seo_framework()->s_description_raw( $product->post_content ) ?: $excerpt )
    				 : $excerpt;
    	}
    
    	return $excerpt;
    }, 10, 2 );
    Thread Starter qzya

    (@qzya)

    I’ve tried your code, but it seems that it doesn’t work. I’d better wait for the next release, thanks for the quick reply!

    • This reply was modified 6 years, 8 months ago by qzya.
    Plugin Author Sybre Waaijer

    (@cybr)

    Hi, qzya

    I just tested the code. Here’s what I found:

    1. It does work in the meta tags, this is what Google reads.
    2. It doesn’t work in the meta box custom description placeholder.

    That’s why I didn’t recommend it ??

    The plugin’s a bit erratic when it comes to snippets, and fixing this is what I meant with “improving the code flow”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘large description’ is closed to new replies.