WordPress.org

Forums

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

  1. chrisaliceko
    Member
    Posted 1 year 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 ?

    http://wordpress.org/plugins/wordpress-seo/

  2. webslugger
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  5. Hargitai David
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

    Thank you very much for your help

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress SEO by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic