Support » Themes and Templates » Nav Question

  • Hi,

    I am in navigation woes… 😉

    First the situation:

    – instead of a “single.php” the individual posts use their category template, which – to customize the header image – is a different one per category.

    – I use these plugins (in some way probably relevant to the topic): Post Templates by Category, Category Template Inheritor, Custom Query String

    I would now like to have single posts display either

    – previous post/next post

    or

    – a list of the prior and anterior 3-5 posts as linked titles

    or

    – the above with “page numbers”

    or

    – a link to the main category page of the category the post is in

    I definitely would prefer the first of the four. I’ve been studying plugins and tags and had a hard long look at the category template and still don’t know what to do. The category php has the usual next/previous tags in it, but they show only as URLs to the next archive pages in the main category page, not on single posts.

Viewing 4 replies - 1 through 4 (of 4 total)
  • If you are using both of these: “Post Templates by Category, Category Template Inheritor” – which one is really displaying the single post? I never used these two together, so I might be missing something 🙂 [as it often happens…]

    On the other hand: can the next_post tag
    http://codex.wordpress.org/Template_Tags/next_post
    and its twin be included in the template? Eventually with a conditional: if is_single etc. ? [just thinking aloud]

    Hi moshu,

    I think in the case of the relevant category I talk about it’s template by category which decides the template.

    I wondered about the conditional, but right now I have trouble imagining where to paste the tag in the php and what it would call.

    And would is_single refer to the single.php (which I as I said don’t use) template or to the fact that this is a single post?

    As an added info – I don’t use permalinks so most breadcrumb plugins are a no-no.

    1. I can answer the is_single question. Having in mind that a theme might not have a single.php file, so the single post view is displayed by the index (see the Template Hierarchy) and this conditional still works – I assume the is_single refers to the fact that this is a single post.

    The rest is just guessing (since I am not a coder): possible to have the next/previous post link above the Loop?

    Hi moshu,

    LOL yes – the problem is, I’m also no coder… 😉

    I think your supposition about is_single is correct.

    As to the loop in that template… I think I need a good night’s sleep before I tackle that. But currently those next/previous calls are I believe inside it.

    Any coder out there with a clue? 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Nav Question’ is closed to new replies.