• Resolved raffactor

    (@raffactor)


    Running Yoast SEO 3.1.1

    My page content is a mix of text and shortcode.
    Example: “On [date] you can find [item] here”.

    When you visit the page, the content shortcodes are converted into the dynamic text as they should be.
    Example: “On 3/15 you can find widgets here”

    If I do not enter anything in the snippet editor, and it defaults to the first few words of the content, the snippet editor shows: “On [date] you can find [item] here”, not converting the shortcodes.
    On the actual page, the meta description shows: “On you can find here”, removing the shortcode, but not replacing it with the dynamic text.

    If I copy the content in the snippet editor, the snipped editor shows “On [date] you can find [item] here”, again, not converting the shortcode.
    But on the actual page, the meta description also shows “On [date] you can find [item] here”, keeping the shortcode words themselves.

    It seems that if nothing is entered in the snippet editor, the meta description is the content by default, showing but not running the shortcodes. But if I enter text and shortcode in the snippet editor, the meta description is just the text, stripping the shortcodes.

    Any thoughts on the issue?

    https://www.ads-software.com/plugins/wordpress-seo/

Viewing 1 replies (of 1 total)
  • Thread Starter raffactor

    (@raffactor)

    The shortcode is from the following:

    add_shortcode( 'street_address', 'street_address_shortcode' );
    function street_address_shortcode(){
    	return get_post_meta( get_the_ID(), 'street_address', true );
    };

    All it does is query the meta data from a CPT.

Viewing 1 replies (of 1 total)
  • The topic ‘Shortcode in Snippet Editor / Meta Description’ is closed to new replies.