Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • abcpeter

    (@abcpeter)

    Otto, adding a query_posts() into the Loop does the trick. But then the page navigation of a page that use this query_posts() is not working properly.

    Let me explain. I have a static front page, a Posts page and a page that have a query_posts() in its Loop. I want to use the default Posts page to show posts ordered by date and another page (the one with a query_posts()) to show posts ordered by title. So, in order to make the page display posts by title I include the following into the Loop:

    query_posts("cat=&orderby=title&order=asc");

    And when I visit the page I do see posts ordered by title, but when I click on the next page link (next_posts_link), I get referred to root.com/pageslug/page/2/, but all the results/posts are the same as on the previous page. So, no matter if you go on the next, or on the previous page, you always get the same results/posts.

    I use WordPress 2.2

    abcpeter

    (@abcpeter)

    ovgray, the code you suggested fixes the highlighting when the static ‘Posts page’ is visited. In oder words – when you visit the static Posts page, the corresponding <li> tag gets a “current_page_item” class.

    But there is another problem. Let’s say our static Posts page is called “Blog”. So, when you perform a search, or when you visit a category page, the <li> tag for the static Posts page (“Blog”) is always highlighted 🙁
    Is it possible to avoid this problem by adding something to the code you suggested?

Viewing 2 replies - 1 through 2 (of 2 total)