Once working with WordPress I wish to exclude all posts in category 22 or (‘Careers’) from showing on the home page. A simple solution like
< ?php query_posts('cat=-22');?>
excludes all posts of category 22 (‘Careers’) from my homepage, but breaks my pagination; when the ‘Newer Entries’ or ‘Older Entries’ buttons are pressed, it simply returns the same posts. Read the rest of this entry »
If you have ever wanted to display or hide posts from a specific category only, then it’s pretty easy to do – if you know how.
So you have a WordPress blog with a list of categories. You have specific template (say, the footer section) which is applied to all categories exept “Press Release”. And you need to exclude the posts with certain category (“Press Release”) from this template.
A Small Intro
WordPress has the ‘query_posts’ codex – to alter the main query that WordPress uses to display posts.
If you want to show posts from one specific category (“Press Release”), the code is:
Once I setup WordPress blog on the client website. It was a large content management system configured as the main site in IIS with a subfolder running WordPress also. The problem I faced was getting permalinks to work (by default WordPress uses web URLs which have question marks; the ability to create a custom URL structure for permalinks is useful from SEO perspective and this feature works like a charm usually.) Unfortunately, my case was a bit different.
If I check any settings for the website in subfolder (exept default) in WordPress Administrator Option tab, I got 500 error. Read the rest of this entry »