WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to enable particular category? (6 posts)

  1. hktvb2001
    Member
    Posted 8 years ago #

    On the main page of the blog, each time I made a post, it always show the post. But I just want to show the post that I have made in a specific category.

    Suppose I have created two category called: Cat 1 and Cat 2.
    Then I made two post, one on Cat 1 and the other on Cat 2. If I go to my main blog page, I will see that there's two post. But I only want to see the post that I have made in the Cat 1. What should I have to do?

    Thanks!

  2. moshu
    Member
    Posted 8 years ago #

    What should I have to do?
    Search :)

    for things like exclude category, category invisibility...
    Go to Plugins... read... etc.

  3. hktvb2001
    Member
    Posted 8 years ago #

    OK! I know search, but it is possible?

  4. Kafkaesqui

    Posted 8 years ago #

  5. hktvb2001
    Member
    Posted 8 years ago #

    Well, it's not what I am looking for.. But I have found a solution.. Here's the solution, in case that maybe someone wants:

    On the index.php, add this code just after <?php:
    $blog = 1;
    if (!isset($cat)) {
    $cat = "#";
    }

    Change the "#" to the category that you would like to show in front of your index..

  6. Toucouleur
    Member
    Posted 8 years ago #

    could exist such a way n the 1.52 version ? have been looking for hours now to find a solution but what was posted here is not available with the latest release...

    please help !

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.