• Resolved actifred

    (@actifred)


    Hi,

    I’m currently working on a local site and just tried your plugin. Unfortunately, with the current versions of Divi and WP at least, every existing post type is included in the search results.

    It seems to be due to the fact that the shortcode for the included types is using a mix of “on” strings and empty strings, whereas the pre_get_posts hook looks for “off” strings to remove any unused type. But since the value is either “on” or empty, it never excludes any post type from the query.

    I don’t know if this was just a mistake or an update in Divi multiple checkbox handling. Anyway, I think you should be able to fix it quite easily. Do you plan to release an official update soon ?

    Best regards,
    Fred

    • This topic was modified 5 years, 9 months ago by actifred.
    • This topic was modified 5 years, 9 months ago by actifred.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author ferventsolutions

    (@ferventsolutions)

    Hi Fred! Thanks for taking the time to dig in on this! I’ve run through some tests on the current versions of Divi and WP and it is working correctly for me. Divi should be setting the unselected options to Off in the shortcode.

    However I could foresee a couple scenarios where there would be an issue… One would be if post types were created after the search module was setup, another would be if the search module was setup before updating to the latest version of the plugin.

    I would suggest deleting the module on the page, then adding it and configuring it fresh. If you’re still seeing that same behavior, then email me directly so I can work on duplicating the issue.

    Thread Starter actifred

    (@actifred)

    Hi,
    just to let you know: I tried what you suggested and it eventually worked as expected. I guess I had an issue with the cache in Divi.
    Thanks for that very helpful extension, by the way. ??

    Best regards,
    Fred

    Hi there! I am having the same issue, I tried deleting the module and adding it back in and also deactivating the plugin and reactivating.

    Is there a good way to clear the cache in Divi? I love this plugin and it has worked really well for my client thus far, I just randomly stumbled on this issue today.

    Thank you!
    – Sam

    Having the same issue as well. I deleted the module and re-added, but it is still showing all post formats in the url when doing a search.
    Any help would be appreciated.
    –Jason

    So I had this problem too but I accidentally stumbled across and easy fix:

    1. When you add it to your page, select all the choices (Posts, Pages, Projects, Goals). Save the page.
    2. Update the settings by unchecking what you don’t want (I only wanted Projects so I unchecked Posts, Pages, and Goals). Save the page.

    Strangely this made it work, but it meant I had to do it for every page thereafter.

    Bugpy … your solution worked perfectly!! Thanks for posting the solution.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘All post types are included in the results’ is closed to new replies.