• Hi All,

    After long hours of reading i had found this post with the “solution” from Moshu ; https://www.ads-software.com/support/topic/55599?replies=7

    Moshu give the solution : https://www.lesartisans.org/blog?cat=3.

    My problem is that i would like “include” this result in my main page but it generate errors. Logic cause he call several things that i don’t need and i suppose twice code. So i would like include with another file (eg. middle,php) that show the same result, with out header, footer…so what is the code must insert in that middle.php file ??

    Attention i’m not at all familiar with php !!!!!!

    Moshu show you power giving me the solution ??

Viewing 1 replies (of 1 total)
  • Hi!,

    To exclude 1 category from you index.php page, you have to add a simple line after the:

    <?php get_header(); ?> <div id="content" class="narrowcolumn">

    the line is:

    <?php if (is_home()) {query_posts("cat=X");}?>

    The “X” is the ID of your category you have to put a MINUS simbol before the id number, so the whole thing would look like this:

    <?php get_header(); ?>
    	<div id="content" class="narrowcolumn">
          <?php
       if (is_home()) {
          query_posts("cat=-5");
       }

    This says to the page to exclude the category “ID 5” from the posts listed in that page.

    Hope this can help!,

Viewing 1 replies (of 1 total)
  • The topic ‘One category show page’ is closed to new replies.