Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
Exclude categories from Posts Page « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

Exclude categories from Posts Page

(3 posts)
  • Started 4 years ago by Pictrix
  • Latest reply from Pictrix
  • This topic is resolved
  1. Pictrix
    Member

    I'm am looking to:
    1) have posts of certain categories, Press & Events, appear ONLY in their own individual pages, and
    2) exclude them from being displayed in the “Posts Page” without using plugins.
    The Front Page is set up as a static page.

    For item 1), I set up a template that displays posts from a category that has the same name as the page. (See http://mygraphicfriend.wordpress.com/2010/01/20/wordpress-create-a-page-template-that-displays-posts-from-a-category-that-has-the-same-name-as-the-page/#comment-133).

    For item 2), I've tried different approaches discussed in this forum but I have not been able to implement them successfully, probably because the facts of the other topics were different than mine and because I'm very new to php.

    What code do I need to insert where? I'll greatly appreciate any suggestions!

    Posted 4 years ago #

  2. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    arturkim

    Member

    Put the following code into your functions.php file and modify the category ID.

    You can read more about query_posts() in the codex: http://codex.wordpress.org/Function_Reference/query_posts

    function childtheme_above_indexloop() {
    	$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=-3&paged=$paged");
    }
    add_action('thematic_above_indexloop', 'childtheme_above_indexloop');

    Artur Kim

    Posted 4 years ago #
  3. Pictrix
    Member

    Your code worked perfectly, thanks so much!
    I appreciate the "read more" link too.

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183