Support » Fixing WordPress » Having a “sticky” post when entering a category

  • Hello, I would like to have a specific post on the top when you click a category.

    For example, if I have :

    -category “wordpress”
    –post4 : “plugins”
    –post3 : “themes”
    –post2 : “download”
    –post1 : “what is wordpress”

    I would like that, when you click on the “wordpress” category, the post#1 is shown on the top and the others are listed after.
    Like an “home” post…
    If you click on one of the posts, this “home” post is not showing anymore.

    Is it possible, and how ?
    THanks !

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’d imagine you could do this with a custom query. I know you can do it on the index page of your blog, so I don’t see why you couldn’t do it with categories, as well. Of course, depending on how many categories you have, it could be a pain in the butt, because I don’t thin you can “automate” it in any way – you’d have to do it manually (so to speak – but someone smarter might come along and know exactly how to do that!)

    So you’re looking to do something like this: if you have a “Category.php” file, then you want that. Most likely, you don’t – but you can create one. If you don’t want to, then you’ll want to put this in your index.php file – but it might be “cleaner” to create a copy of index.php, name it “category.php” and do it all in there, since this is a category-specific thing.

    In any case, you’ll want to take a look at this tutorial. it’ll explain how to do it. There may also be some plugins for doing this so you don’t have to code yourself, try googling for that 🙂

    Using Category_Templates, build a template for each category?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Having a “sticky” post when entering a category’ is closed to new replies.