Jump to content
Sign in to follow this  
Eileen Starbuck

Is it possible to prevent a post from appearing on my blog?

Recommended Posts

Eileen Starbuck

I have business related posts and personal related posts. (categories: personal, business) Is it possible to just show the "personal" posts on the blog?


"...learning, growing and sharing online!"

http://www.everythingeileen.com

Share this post


Link to post
Share on other sites
Danny
Hi Rhelling, This is something you would need to ask the Wordpress support team.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Eileen Starbuck
Okay...got my answer from WordPress...but where in PageLines do I add this? (...they told me to add it to my theme index.php...but that just didn't look right.)

"...learning, growing and sharing online!"

http://www.everythingeileen.com

Share this post


Link to post
Share on other sites
anthalis
Hi Randal, If you are using the base theme, you can add an exclude function to your functions.php file to exclude the posts that are not in the desired category. [code]function exclude_category( $query ) { if ( $query->is_home ) { $query->set( 'cat', '-1' ); } } add_action( 'pre_get_posts', 'exclude_category' );[/code] Replace -1 with whatever category you would like to exclude. This might interfere however with certain settings of the Features section (i believe if you use all posts, it will remove posts in that category from the slider too - but this was before the 2.2 version and I might not remember it correctly. If you find the function to work funny for you, for whatever reason, there is also the Simply Exclude wordpress plugin http://wordpress.org/extend/plugins/simply-exclude/ which worked great for me on a website. You will just have to pay attention to how you set it up. Good luck.

Share this post


Link to post
Share on other sites
Eileen Starbuck
...just curious - do you think you could exclude a "tag" easier?

"...learning, growing and sharing online!"

http://www.everythingeileen.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×