• Hi,

    I have a site with a main nav., and want to have categories on each side, with static posts or pages on them that people can refer to for information. I do not want the posts to show up on my main home page, or main pages, I just want people to be able to look at them if they’d like.

    Do I do these information sections as posts or pages? and if posts, how do I keep them off and from cluttering up the main pages?

Viewing 1 replies (of 1 total)
  • I suggest you create a post category for all posts you don’t want on the homepage or main pages. Then assign those posts to this new category

    Then you need to add a query posts statement before the WordPress loop on all the template pages (like index.php) on which you want these posts excluded. Tell WordPress to exclude that new category from the page.

    If the category ID number is 11, the query_posts statement would look like
    <?php query_posts('cat=-11'); ?>
    that is a minus 11 which means exclude.

    See this page for info about query_posts
    https://codex.www.ads-software.com/Template_Tags/query_pohere;s an article about how to determine category ID
    https://www.wprecipes.com/how-to-find-wordpress-category-id

Viewing 1 replies (of 1 total)
  • The topic ‘How do you block posts from the main setup of the site?’ is closed to new replies.