Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ziflin

    (@ziflin)

    Actually, I no longer seem to be able to get it to work with v1.1.1. I’m able to add custom pages, but it doesn’t seem to be adding the existing published Pages that I have on my website.

    Thread Starter ziflin

    (@ziflin)

    Nothing to see here…

    The missing pages was caused by a snippet of code that was suggested to use for removing “Pages” from showing in search results. This apparently broke the plugin’s ability to find Pages. Hopefully this helps anyone that runs into a similar issue.

    This was the problematic code:

    function remove_pages_from_search() {
        global $wp_post_types;
        $wp_post_types['page']->exclude_from_search = true;
    }
    add_action('init', 'remove_pages_from_search');
    Plugin Author Webbjocke

    (@webbjocke)

    Hi great that you found the problem.

    Yeah that code will remove pages from almost all types of queries, if you only want to remove from search results have a look here https://www.wpbeginner.com/wp-tutorials/how-to-exclude-pages-from-wordpress-search-results/

    Thread Starter ziflin

    (@ziflin)

    Yup, that’s the code I’m using now and so far it works great despite it not being the top answer on Stack Exchange. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No Longer Seems to Include Pages!’ is closed to new replies.