• Hello again I don’t find answer of my question anywhere.

    When I add new post he appears on on my home page. I want when add some of my posts to be only in category (no to home page).

    I will be very happy if somebody can help me I try to use private post but this don’t work for my optimization (must be logged to see it).

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    Thread Starter gladiator6

    (@gladiator6)

    Thank You I will try this 🙂

    Thread Starter gladiator6

    (@gladiator6)

    Okay I see this:

    Placing this code in index.php file will cause the home page to display posts from all categories except category ID 3.

    <?php
    if ( is_home() ) {
    query_posts( ‘cat=-3’ );
    }
    ?>
    Great but where to see what is my cat id 🙂 I have name and slug of the category that I want to exclude.

    I try to use my slug to export it but with echo and print_r I can export only array and huge amount of data for this :
    uery_posts( ‘cat=-3’ );

    Ah I find answer :
    The easyest way to do this is to open from wp admin category for edit and to see url bar:
    mysite/wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=15&post_type=post
    Here the id is 15 🙂
    If somebody know how I can find it with php I will be glad to try and test this. Just to export array with categories or to exclude it by slug.

    Thank You in advance.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Post question’ is closed to new replies.