In your pre_get_posts hook, you’re excluding all built-in post types, then only re-adding the
postpost type. This means that any time we try to get anything from the database, it grabs all custom post types and posts, but no pages. Not so good for search results. 😉
The most immediate and obvious fix is this: http://pastebin.com/gXUUVAXf
However, this is not a great solution because it’s not forward compatible. It doesn’t take into account additional built-in post types that may surface. So I think that it’s possible that you want to hook something other than
pre_get_postsOR change the way in which you exclude-then-include OR add more conditionals so it’s not so greedy.
- The topic ‘[Plugin: Ultimate CMS] pages excluded by your pre_get_posts hook’ is closed to new replies.