• Hi

    I hope I’m not asking something already covered but I seem to be going round and round in circles.

    I wonder if anyone is able to tell me how I organize for this type of situation please?

    If, for example, I set up 2 categories.

    1) For the everyday blog and gossip.

    2) For interesting articles etc.

    I only want the posts within the ‘Articles’ category to show when someone clicks on the ‘Articles’ link in the sidebar.

    I don’t want them to show in the long list of posts that automatically seems to show.

    I want the everyday ‘gossip’ posts to show like a normal blog (1 after the other).

    I basically want to separate the 2 categories and don’t want them showing all jumbled up together in one long list of posts.

    Does that make sense?

    I’m new to this and although I understand some of it, I’m not sure on a few things such as this.

    Thanks for any help in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dendaw

    (@dendaw)

    Hi

    Any ideas on this at all?

    I keep looking but cannot sort it out.

    Thanks very much.

    I have a sollution for you. Not the most fancy, but it works.

    Between
    <?php if (have_posts()) : ?>
    and
    <?php while (have_posts()) : the_post(); ?>

    In the index.php of my theme, I have put the following code:
    <?php query_posts($query_string . '&cat=-1000,-1001'); ?>

    That codes prevents the categories 1000 and 1001 to appear on the index page (you can find the category ID when you hover over a category in the edit category screen). In my case I manually numbered the categories because I have a multisite, but you probably don’t have to worry about that.

    So, saying that your gossip has category ID 2, you exclude 2 and your index will only have category 1.

    Then under “links” make a link to your gossip, the direct link to category 2.

    One of the results is that when you have your index set on showing 20 posts and 15 are in the gossip category, people will see only 5 posts (there is a workaround for that, but that’s too difficult for me).

    Like I said, not too fancy, but it works.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Organizing categories’ is closed to new replies.