Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @spoodes,

    Thank you for contacting the support.

    We’ve added your vote for the variable to our internal suggestions lists.

    For now, if you wish, you can add the below code to the website to get the long description:

    add_action( 'rank_math/vars/register_extra_replacements', function() {
    rank_math_register_var_replacement(
    'woo_long_desc',
    [
    'name' => esc_html__( 'Woo Long Desc.', 'rank-math' ),
    'description' => esc_html__( 'Gets WooCommerce Long Description...', 'rank-math' ),
    'variable' => 'woo_long_desc',
    'example' => woo_long_desc_callback(),
    ],
    'woo_long_desc_callback'
    );
    } );
    function woo_long_desc_callback() {
    global $post;
    if ( false === is_product() ) { return '';
    }
    return wp_strip_all_tags( $post->post_content );
    }

    After adding the code, you can use the variable %woo_long_desc% and see if it gives you the desired output.

    You can follow this guide to add the code:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope this helps.

    Thread Starter Sandra

    (@spoodes)

    Thank you very much!

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @spoodes

    Glad that helped.

    If it isn’t too much to ask for – would you mind leaving us a review here?
    https://www.ads-software.com/support/plugin/seo-by-rank-math/reviews/#new-post

    It only takes a couple of minutes but helps us tremendously.

    It would mean so much to us and would go a really long way.

    Thank you.??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Product Meta – only %wc-shortdesc%’ is closed to new replies.