I am using the Boldy theme from Site5 on a v3.1.2 site.
The way this theme works, is that there is a portfolio, (which I am using as a case studies gallery) that pulls in posts from a specific category you define under the themes settings (id=98)
This is fine if you also set the blog up as per the Boldy instructions, where all blog posts come under a category called blog, but this wasnn’t going to give me the slugs I wanted, so I adopted to use a static page called blog to show my posts on.
This all works fine, apart from the fact that the posts I create for my portfolio/case studies gallery (category = case studies) now appear in my blog as well.
Is there a way to hide posts within a specific category within the blog, but for it not to have the same affect in my case studies gallery?
–EDIT–
With some help from Wyck via the comments, made some progress.
Here is a txt version of my themes default index.php file.
If I insert the following onto Line 2:
<?php query_posts($query_string . '&cat=-98'); ?>
= This results in no posts being shown on my Downloads page, but all posts still appearing on my Blog page.
I need the vice versa of this. I am sure I am close, but perhaps I need to modify which line I put this on?
–EDIT x2–
Now using the download monitor for my downloads gallery. But using the portfolio for my case studies. So some of the links above have changed, but the problem is exactly the same.
You want the category 98 to be excluded only on the blog page, right? They should be accessible on the category page directly (your downloads page), correct?
Can you try this? Let me know if its not what you want, we can modify it to suit your needs. Right not it only excludes the category on where you show your blog posts.
In Settings -> Reading if your Front Page is not set to show “Latest Posts” whatever is selected as posts page will use the index.php template.
Your comment is correct your “static page” is using index.php
To use a static page with a custom template for your blog post change your reading settings as follows:
Change This:
To This:
For your custom template
just copy and paste index.php tocreate a new file and name it custom-page-blog.php and add this to it.Go to your static “Blog” Page and select the new template in page atributes.
It’s difficult to tell since you supplied no code but removing a category from your blog loop is typically very easy.
For instance above the main loop, if your category “portfolio” has an id=12 :
Why don’t you use something like WordPress Download Monitor?
if you use static page to show the blog post, add the wyck’s code to template that used for that page.