Jump to content

Recommended Posts

Fatal error: Uncaught Error: Call to a member function the_post() on null in /home/u529199620/domains/xxxxxxxx.com/public_html/wp-includes/query.php:979 Stack trace: #0 /home/u529199620/domains/xxxxxxx.com/public_html/wp-content/plugins/td-cloud-library/wp_templates/tdb_view_category.php(17): the_post() #1 /home/u529199620/domains/xxxxxxx.com/public_html/wp-includes/template-loader.php(106): include('/home/u52919962...') #2 /home/u529199620/domains/xxxxxxxx.com/public_html/wp-blog-header.php(19): require_once('/home/u52919962...') #3 /home/u529199620/domains/xxxxxxxxx.com/public_html/index.php(17): require('/home/u52919962...') #4 {main} thrown in /home/u529199620/domains/xxxxxxx.com/public_html/wp-includes/query.php on line 979

- The Line 979 :

977    function the_post() {
978    global $wp_query;
979    $wp_query->the_post();
980    }


Please help me any solution

Do you have to write a function simply to call another function?  And does that global var you are using really exist cause the message is implying that it doesn't?

Edited by ginerjm

It means $wp_query is null at the time the function is called. If I'm remembering correctly, this can happen if your function is called before the 'posts_selection' action is fired - if you're not in the loop.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.