Excluding categories from home page
-
Can anyone help me to exclude a category and all its children from being shown on the home page of the PR News Theme. I have found the solution:
https://codex.www.ads-software.com/Template_Tags/query_posts#Exclude_Categories_From_Your_Home_Page<?php if ( is_home() ) { query_posts( 'cat=-3' ); } ?>
But I do not know how to implement this code to the PR News Theme for it to work; I know how to edit the theme index.php and so on; but just not how to implement this code.
I would also like to do the exact same thing but for a wordpress multi-site set up for different countries with subdomains. I understand this can be done as above if I use child themes for each site. But I would like to know if it isn’t also possible without creating child themes?
Any help much appreciated!
Some info about what I am trying to achieve:
I am using the PR News Theme as a bulletin board to display current/up-coming events with the front page being all recent posts showing full length post excerpts. I manage the different events with parent and child categories and have navigation with a custom menu composed of the categories.When events have taken place I do not want them to show on the home page. But I would still like them to remain published for SEO purposes and as a showcase of past events if the user clicks the parent category archive that I will put all past events in also changing their category to past-theirchildcategoryname. This way they will not show up among any current/upcoming events by selecting categories; but only show if the user selects the archive parent or the past-theirchildcategoryname and still be indexed in search engine results.
That is what I am trying to do.
Any help or input much appreciated.
Thank you PResponsive for a real clean and responsive theme; I really like it. It lets the content shine and be the star of the show and does not take over the show like a primadonna that some overdesigned themes do.
- The topic ‘Excluding categories from home page’ is closed to new replies.