Ajay's Creations Support Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ajax Edit Comments is now subscription based. All support questions need to be directed to http://www.ajaxeditcomments.com/forums/

Pages: 1 [2]   Go Down

Author Topic: my where did they go does not work  (Read 671 times)

ddeconin

  • Newbie
  • *
  • Offline Offline
  • Posts: 14
    • View Profile
    • Verteleens
Re: my where did they go does not work
« Reply #15 on: March 04, 2010, 02:51:12 PM »

Ok, got a bit further. My original theme had in the sidebar the loop on cathegories and then all sidbar widgets. With this setup, and I go to a single post, in the footer is_single() resolves to true. Then I moved some of the widgets (Latest Comments, Latest Posts) to the sidebar before the cathegory loop and then is_single() in the footer resolves to false.
So now the only question remains. How can I 'force' is_single() back to false? without putting the 'latest comments' and 'latest posts' below the category loop.
Logged

ddeconin

  • Newbie
  • *
  • Offline Offline
  • Posts: 14
    • View Profile
    • Verteleens
Re: my where did they go does not work
« Reply #16 on: March 04, 2010, 03:01:06 PM »

Yes, found it, it was in the codex all along.

http://codex.wordpress.org/Function_Reference/wp_reset_query

So the thing to remember is :
whenever you create a custom query, after that , call <?php wp_reset_query(); ?> to to 'This function destroys the previous query used on a custom Loop. Function should be called after The Loop to ensure conditional tags work as expected.'

so, now I got to go and talk to my theme vendor about not being able to solve this ;-)
Logged

Ajay

  • Administrator
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 596
    • View Profile
    • Ajay - On the Road called Life
Re: my where did they go does not work
« Reply #17 on: March 05, 2010, 10:44:40 PM »

That is a good point. And in fact an interesting discovery that I plan to take a look at myself.
Logged
Pages: 1 [2]   Go Up