Ready to get started?Download WordPress


WordPress SEO by Yoast
[resolved] Fatal error after installing plugin (6 posts)

  1. chrisaliceko
    Posted 11 months ago #

    Each time after I install Yoast, my browser displays following message when I try to access any page from my website :

    Fatal error: Call to undefined method WP_Query::is_main_query() in /homez.429/christine/www/wp-content/plugins/wordpress-seo/frontend/class-frontend.php on line 518

    Any idea how I can solve this problem ?


  2. webslugger
    Posted 11 months ago #

    disable all other plugins except for yoast and see if you still get that error, if not add them back in one by one until you get that error

  3. chrisaliceko
    Posted 11 months ago #

    Thanks webslugger.

    I did as you suggested , disabled all plugins. even deleted yoast and added it again. Result is : I have the same fatal error ...

    As I didn't read anything like this on the forum, could it be a problem with my theme ?

    I am using Clearly Modern 1.7 par Cudazi

  4. webslugger
    Posted 11 months ago #

    do you get the same error when enabling the twenty-ten theme?

  5. Hargitai David
    Posted 11 months ago #

    Hi chrisaliceko,

    Maybe the problem is that your WordPress version is lower than 3.3, and is_main_query() function exists since this version.
    If you don't want to upgrade it, you can change the class-frontend.php according to: https://gist.github.com/Viper007Bond/1297669

    It works me well.

  6. chrisaliceko
    Posted 11 months ago #

    Indeed I had an old version of WP !
    Upgraded it and now Yoast works beautifully

    Thank you very much for your help


You must log in to post.

About this Plugin

About this Topic