• I’m trying to modify a template so that all dynamic info will be category specific and will only be visible in the relevant categories.

    I’ve been using category-6.php etc for the category pages which works fine. However, a post listing reverts to index.php. Also I want the monthly archive (in the sidebar) to be category specific.

    Any help would be greatly appreciated as my php skills are rudimentary at best.

Viewing 5 replies - 1 through 5 (of 5 total)
  • However, a post listing reverts to index.php
    I am not sure I understand this…

    Also I want the monthly archive (in the sidebar) to be category specific.
    WP doesn’t provide that feature out of the box.
    There were several attempts to do it – search the forums; I can’t remember a sure solution for it, which doesn’t mean it doesn’t exist ??

    Thread Starter iaineach

    (@iaineach)

    Thanks moshu.

    A post listing reverts

    Excuse my terminology. If I go into a category which uses a category specific template and then click on a post I presumed the post would use this same template. But it uses index.php instead.

    Also I searched the forums but the best I could find was a link to Custom Query String but I’m not sure how to use it.

    OK.
    No, single post view does NOT “inherit” the category’s template.
    It uses single.php or index (see Template Hierarchy).
    Workaround:
    https://guff.szub.net/2005/07/21/post-templates-by-category/
    (on the same page another plugin, the “inheritor” is also mentioned)

    CQS will not do what you want.
    As I said: I can’t remember any working solution for category archives by months.

    Thread Starter iaineach

    (@iaineach)

    thanks again, if I get a solution I’ll post a link to it.

    iap, i have the same problem.

    i used this post-templates-by-category plugin, but i have a problem: it does not keep the parent/child category when i try to view a post, it uses the index…

    i created for example category-14, which is one of the parent categories, and indeed, when i click a child of this categ, it keeps the template. but vhen i try to view on of the posts in any child of c..-14, it does not use the template.

    how can i keep the template when i view the posts? or what else can i do?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Templates – Using Category specific Posts and Archives’ is closed to new replies.