Support » Fixing WordPress » I want category links which only contain 1 post, to go directly to the post…

  • showmii

    (@showmii)


    Hi all, the title says it all…

    i have many categories, and many of the categories go to a single post… i’m essentially using the categories as a convenient way to build an index/directory.

    Is there a way to instruct the database to return a specific post, instead of a category, if the category clicked only has the one post?

    I”m finding that it’s a little inconsistent the way it is, and lots of people who are linking to me are linking to a category archive instead of directly to the post…

    thanks in advance!
    -CHris

Viewing 6 replies - 1 through 6 (of 6 total)
  • showmii

    (@showmii)

    btw my site is http://www.showmii.com

    Sivar

    (@sivar)

    When I clicked your link -> Error establishing a database connection

    moshu

    (@moshu)

    1. Your blog has a DB problem.
    2. What you are asking that is inconsistent 🙂 – category archives behave as expected: display a list of posts in that category.
    (whether it displays full text or only excerpts, that’s a choice in the theme’s template files)

    showmii

    (@showmii)

    moshu,

    yeah my host is having DB problems today…

    thanks for the reply… I’m using the Sunwear theme. I was wondering if perhaps there’s a way to hack at the categories a bit and instruct them to a)look to see how many posts are in the category, and b) if there is only 1 post in the category, to call that specific post?

    showmii

    (@showmii)

    or failing this could you suggest a good alternative?

    Sivar

    (@sivar)

    An alternative would be to let your category template display posts (resp. your one post) like single.php does by using the_content() and without more-tags. That’s btw, what moshu suggested when he (she? *g*) was talking about full text or only excerpts.

    Of course, you wouldn’t need a category.php to do that, but I personally like it better when index.php isn’t too messy ;).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I want category links which only contain 1 post, to go directly to the post…’ is closed to new replies.