Sometimes you might want to exclude a blog category from your WordPress loop, for instance you might have a category that you are using for something other than for blog posts.
The following piece of code goes right before your loop and you just need to find the category number you want to exclude and then change the number. I have included the first line of the loop so you can see where this code belongs.
If you are struggling to find the id number for the category, you just need to go to Posts / Categories and then hover over the category name that you want to exclude. Depending on your browser your should see the ID number right at the bottom of the page when hovering on the category name.
Hope you find this useful.
How do you go about growing your agency? Do you rely on repeat business and…
Following on from yesterday's post “if you want to be tougher, be tougher”, this is…
We were recently asked by someone why we relatively expensive and charged more than someone else…
We are pleased to announce that our first e-book is now available to download on…
A nice mix this week of Wordpress guides and e-commerce posts make up this weeks…
GDPR features today and this is going to be a hot topic in WordPress and…
This website uses cookies.