• Resolved dcis2019

    (@dcis2019)


    Hi,

    First of all great job on this fantastic plugin!
    We do however have this issue where shortcodes don’t work on the ‘title’ field, as well as the yoast title (_yoast_wpseo_title) field.
    We added multiple filters to make the shortcodes work in the title, like these:

    
    add_filter('wpseo_title', 'do_shortcode', 1000, 1);
    add_filter('wpseo_opengraph_title', 'do_shortcode', 1000, 1);
    add_filter('the_title', 'do_shortcode', 1000, 1);
    

    And they work well on the site, however, in the feed it shows only the shortcode, like this for example:
    [vg_seo_title dimensions="80x80" pockets=15]

    shortcodes in descriptions work however…

    Is there any filter I’m missing?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Ohidul Islam

    (@wahid0003)

    Hi @dcis2019 You can use the below filter to apply shortcodes into the title

    add_filter('woo_feed_get_title_attribute','woo_feed_title_modify',10,3);
    function woo_feed_title_modify($attribute_value, $product, $feed_config){
      return do_shortcode($attribute_value);
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Shortcodes in title doesn’t work’ is closed to new replies.