Woocommerce product long description

#191232
  • Resolved Colin De Cristofaro
    Rank Math free

    Hello,
    I have checked and double checked the settings on Rank Math however I can’t seem to get product pages to be graded properly.

    The Rank Math markers are only grabbing the keyword phrasing from the Short Description and not the Long Description. So, with that, the mentions of the keyword phrase in the long description not appearing in the marker analysis leaves pages showing an inaccurate score.

    I am taking your software for a complete test drive on a few sites using the free version so I can evaluate if I want to implement it for all the sites we manage with an extended PRO version.

    Can you please provide some insight and let me know if we are missing a setting somewhere.

    Thank you very much in advance!

    Colin
    g*********@w******************

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    This is the order we follow to generate meta descriptions for WooCommerce products:

    1. Content from SEO Description field
    If that is missing, then:
    2. WooCommerce Excerpt or Product Short Description
    If that is missing, then:
    3. Template From General Settings in WordPress Dashboard > Rank Math > Titles & Meta > Products
    If that is missing, then:
    4. Auto generated Content from the product page (long description)

    In short, the short description you have set will be prioritized if you’re using the %excerpt% variable for your description.

    In case you wanted to force the use of the long description, you can create a custom variable for the product’s long description by adding the code given below to your theme’s/child theme’s functions.php file:

    add_action( 'rank_math/vars/register_extra_replacements', function() {
    	rank_math_register_var_replacement(
    		'woo_full_desc',
    		[
    			'name'        => esc_html__( 'Woo Full Desc.', 'rank-math' ),
    			'description' => esc_html__( 'Woo Full Description...', 'rank-math' ),
    			'variable'    => 'woo_full_desc',
    			'example'     => woo_full_desc_callback(),
    		],
    		'woo_full_desc_callback'
    	);
    } );
    function woo_full_desc_callback() {
    	global $post;
    	if ( empty( $post ) ) {
    		return 'Product Description';
    	}
    
    	return wp_strip_all_tags( $post->post_content );
    }

    After this add %woo_full_desc% in the SEO description field of the snippet editor

    I hope that helps. Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Woocommerce product long description’ is closed to new replies.