Reply To: 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? Reply To: How to unexclude pages after excluding them?

#13843

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 :)