Forums

Category display issue (9 posts)

  1. hunny042
    Member
    Posted 1 year ago #

    Here is the site I'm working on:

    http://www.trikw.com/dev/

    The items in the blue navigation bar at the top are categories. When you click on the category at the top of the page, how can I make it so the category you clicked on appears as the first post instead of always being "photos"?

    Thanks!

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    check category.php of your theme, there seems to be something wrong with the query and the loop ( = endlessly putting the one post out)

  3. hunny042
    Member
    Posted 1 year ago #

    Sorry ... i think I was playing with it when you looked at the site, so "Photos" was appearing over and over again.

    If you look now, all the different category posts are displayed on the page when you click on one of the categories, but I can't seem to get "TriTraining News" to display as the first post when you click on "TriTraining News", "Weather" to display as the first post when you click on "Weather" and so on ...

    Any help would be greatly appreciated!

  4. alchymyth
    The Sweeper
    Posted 1 year ago #

    are these posts in just one category?

    what is the code of category.php (please use the http://pastebin.com/) ?

  5. hunny042
    Member
    Posted 1 year ago #

    They are all different categories and there is only 1 post per category, which is why I'm so confused. It seems as though the posts are appearing in the order in which the categories were created.

    Here is a link to the category.php code: http://pastebin.com/pSWW4wcY

    Thanks so much!

  6. alchymyth
    The Sweeper
    Posted 1 year ago #

    there is only 1 post per category

    but is there also only one category per post?

    if the posts have more than one category, they will appear in each category archive for each of their categories, and the sequence will be by date. (a category archive will by default also call posts of sub-categories.)

    about the paste code: i meant category.php of your theme (if there is no category.php in your theme, then archive.php; if there is no archive.php either, then index.php)

  7. hunny042
    Member
    Posted 1 year ago #

    Yes, there is only one category per post. I created a category for each post specifically and there are no sub-categories.

    I wasn't sure which file you needed, so here are links to the theme files I found (there was no categories file):

    Archives:
    http://pastebin.com/yvMbAmEB

    Archives Page Template:
    http://pastebin.com/xW2tVd5a

    Main Index Template:
    http://pastebin.com/znfBigTU

  8. alchymyth
    The Sweeper
    Posted 1 year ago #

    even if you click a category link, the theme does not use archive.php, but seems to be using index.php.
    so it soea not seem to be a template issue.

    do you have any forwarding/redirection activated?
    or any plugins that might interfere?

    normal troubleshooting:
    to exclude any theme influence, try changing to Twenty Ten, and see if this behaviour stops?

    if it continues, switch back to your theme and deactivate all plugins.
    if that helps, reactivate one at a time, to see which might be causing the trouble.

  9. hunny042
    Member
    Posted 1 year ago #

    It turned out to be a conflict with 2 wordpress plugins, which is why I didn't find it earlier. Thank you.

    Even better ... for anyone looking to make a category link go to an external page (or post instead of category), I found this awesome plugin:

    Category Redirect to Post or Page

    Just search for it in WordPress and you'll find it.

Topic Closed

This topic has been closed to new replies.

About this Topic