WordPress.org

Ready to get started?Download WordPress

Forums

Ultimate CMS
pages excluded by your pre_get_posts hook (2 posts)

  1. James Revillini
    Member
    Posted 2 years ago #

    UCMS 0.2

    In your pre_get_posts hook, you're excluding all built-in post types, then only re-adding the post post 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_posts OR change the way in which you exclude-then-include OR add more conditionals so it's not so greedy.

    THANKS.

    http://wordpress.org/extend/plugins/ultimate-cms/

  2. zorzi
    Member
    Posted 2 years ago #

    Thank you :-)
    I don't now why, but without this fix, the plugin esclude pages in search result.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic