How to unexclude pages after excluding them?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support How to unexclude pages after excluding them?

This topic contains 2 replies, has 2 voices, and was last updated by WGNHS WGNHS 6 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13837
    WGNHS
    WGNHS
    Participant

    Hi there! We’re currently in the process of designing a series of new pages for our website, and we recently noticed that these draft pages would show up in search results (although the pages themselves weren’t publicly viewable). To fix this, we used Advanced Options > Exclude Results > Exclude posts/pages/cpt to manually exclude the parent draft page and its child pages. This worked to exclude those pages from the search results – but after excluding these pages, nothing appeared in the box on the right for us to undo the exclusion once these pages are published (see attached screenshot). So how do we reverse this to make excluded pages searchable again once they’re ready to go live?

    We’re using Ajax Search Pro v. 4.10.5, WordPress v. 4.7.5. Thanks in advance for your help!

    Attachments:
    You must be logged in to view attached files.
    #13843
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Thank you for the detaisl, turns out, this is actually a bug that has never been detected before. It appears that posts and other custom post type objects excluded within that option, that are other than ‘published’ will not be displayed properly again.

    I have found two possible solutions, one is a permanet (requires code change, will be included in the next release), and one is a temporary:
    Temporary fix
    1. Simply look up a published page and add it to the option (this is temporary only): https://i.imgur.com/l01F0wN.png
    2. Save the settings
    3. Now, remove that page from the exclusions: https://i.imgur.com/rUlnwl6.png
    4. Save the settings again
    This will re-set the option to the initial state, without any exclusions persent.

    Permanent fix
    0. Before anything: Make a back-up of your site!
    1. Open up the \wp-content\plugins\ajax-search-pro\backend\settings\class\wd_cpt_select.class.php file on your server
    2. Replace it’s contents with this: https://gist.githubusercontent.com/anag0/9ac9a1d7846be9898d860565b84a5915/raw/8543f035fd9941f13f5a33f599dbf22045bf1477/wd_cpt_select.class.php
    3. Save the file
    4. Open up the search options, and check if the draft pages are now visible on the list
    5. If yes, just simply remove them, if no, then they are already cleared from the exclusions list.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #13861
    WGNHS
    WGNHS
    Participant

    Thank you so much for the quick response, and for the solutions! We’re still a little ways off from those pages being ready to go live, so there’s a good chance your next update will be released before we need to undo the exclusion. If not, we’ll let you know if we have any problems with whichever solution we end up using. Thanks again!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.