Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #247454

    I’m using the Yoast WordPress SEO plugin and the Open Graph meta data is only being output on posts not pages. If I switch theme the OG data appears. I’ve tried deactivating all other plugins and I have no custom functions/filters.

    Any idea how I can remedy this?

    Thanks

    #247466

    Hey Rustybucket!

    Please insert this code into the enfold functions.php file:

    
    /*
     * Make sure that the plugin adds the og meta tags, etc. on template builder pages
     */
    if(!function_exists('avia_wpseo_change_init_priority'))
    {
        function avia_wpseo_change_init_priority()
        {
            remove_action('template_redirect', 'wpseo_frontend_head_init', 999);
            add_action('template_redirect', 'wpseo_frontend_head_init', 9);
        }
    
        add_filter('init','avia_wpseo_change_init_priority', 20);
    }
    

    We’ll fix it with the next update.

    Regards,
    Peter

    #247472

    Awesome. Many thanks.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Yoast WordPress SEO plugin Open Graph not displaying on pages’ is closed to new replies.