Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #259634

    At one point a while back it appeared that opengraph meta was not being added correctly from the Yoast SEO into Enfold.

    Switching themes fixes issue.

    One of the moderators here suggesting adding the following function to functions.php which fixed the problem. The fix was to be rolled into next update.

    /*
     * 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);
    }

    Has this fix been implemented?

    Cheers,

    Sean.

    • This topic was modified 10 years, 6 months ago by raineysw.
    #259722

    Hi raineysw!

    Yes, the latest version (Enfold 2.7.1) fixes the issue.

    Regards,
    Peter

    #264478

    It still seems to be broken… are you sure it is fixed?

    #264507

    Hi!

    Please try to place this code into your child theme functions.php file and clear the browser (and wordpress) cache if necessary:

    
    if(!function_exists('avia_wpseo_change_init_priority'))
    {
        function avia_wpseo_change_init_priority()
        {
            if(function_exists('wpseo_frontend_head_init'))
            {
                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);
    }
    

    Does it work now?

    Regards,
    Peter

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.