conditionnal tags on sidebar
-
Hi,
Into the sidebar (sidebar.php), I show articles I want :
– A (named) static article
– last articles
For that, I use query_posts and the loop.Thus, I launch two requests query_posts and two loop (is it better to use get_posts with a foreach ?)
It works as I wish… but this behavior must be only for the homepage (I use home.php) and problem is here.Actually, I wanted to use conditional tags in sidebar but that doesn’t work : neither is_home(), nor is_front_page() return correct value (always false while I am on the homepage – root of website -).
So, why it doesn’t work and how can I get it work ?
Is it stupid to use several loops and is it better to use other type of request (and perhaps directly MySQL request) ?
Thank you.
- The topic ‘conditionnal tags on sidebar’ is closed to new replies.