I’m trying to separate the main part of my blog (the informational portion) from more commercial parts.
WHen you load my homepage, I purposely exclude a category because I don’t want my normal readers to be bothered with affiliate links and such.
I’d like to add a subdirectory /reviews/ for example, that loops through the reviews category and displays them all on one page, just like how the category template works.
There are 2 reasons I don’t want to use the category template:
1) I have my SEO settings to block indexing on my category template
2) The /category/ in the permalinks is ugly to me.
Is it possible to accomplish domain.com/reviews/ where it functions just like the category template? Am I stuck with manually building a page? Or am I stuck with domain.com/category/reviews ?
I have looked into building a “network” with WordPress MU, but it says I can’t do that anymore since my blog is >1 month old. Plus it’s kinda technical.
I basically want to add more blogs to my site (to keep everything nicely separated), so I am trying to figure out a workaround by just excluding/including certain categories where I want them.
Am I making sense? Haha thanks to all who take the time out of their day to reply 🙂
You can create a separate category template for just that one category. If your category’s slug is
reviews
you can make a copy of your category template and save it ascategory-reviews.php
.See the Category Templates page on Codex for more info about the template hierarchy.
This still leaves you with the
/category/
part in the permalink, which you can either change to something else globally in the permalink settings, or you can maybe create a custom rewrite rule just for that category.Yes… custom rewrite rule is the way to go! Check this out Is there a PHP function that can match anything after the given URL, so my IF statement will work in each instance?… You’ll get a way to write new URL rewrite rule as per your need.