google read short description instead of description

#191750
  • Resolved RaFaeL
    Rank Math free

    when i searh my product in google its only read short description
    i wanna show me the main descripion of product
    in general setting of rank math every thing is ok
    plz help me tnx

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

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

    I’m assuming you’re using WooCommerce for your products since you mentioned that the short description is showing instead of the main/long description of your products, and you’re using the %excerpt% variable.

    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.

    RaFaeL
    Rank Math free

    tnx i will test and i tell you the result

    Prabhat
    Rank Math agency

    Hello,

    Thanks for your reply.

    Sure, please let us know how that goes.

    Also, if you have another question, please feel free to reach out, and it will be our pleasure to assist you.

    Thank you.

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘google read short description instead of description’ is closed to new replies.