Using The Loop on a template page means current_page_parent is the blog page?
-
Hi all,
I’m building a new theme for a web design company, and it has a number of top level pages (Home, About, Portfolio, Blog, etc..). These pages are listed in the header using wp_list_pages()
On the portfolio page, I applied a specific template, specially made for the portfolio page.
I use query_posts and The Loop to populate this page with posts from the blog that have the category “portfolio”.
If I remove The Loop, when I’m on the portfolio page, it’s
<li>
in the header has the class current_page_item, and if I keep it in, my main blog page in the header has the class current_page_parent, and my portfolio looses its current_page_item class.This means that WP thinks that just because I use The Loop, my page must be a child of the blog, which is not always the case.
Is there any way I can change this behavior?
- The topic ‘Using The Loop on a template page means current_page_parent is the blog page?’ is closed to new replies.