• Hi,

    I really like your product and want to continue using it with my which uses GeoDirectory and BuddyPress at its core.

    Unfortunately, BP Docs is causing problems with GD – GeoDirectory. The developer at GD says:

    ‘They are filtering the search query regardless of post type,
    ask if they can remove their search query filters if $_REQUEST[‘geodir_search’] is set.’

    Please can you help resolve this?

    Thanks in advance.

    Bests

    Al

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter bigoldal

    (@bigoldal)

    Hi,

    Please can you provide a solution?

    Thanks

    Al

    Plugin Author David Cavins

    (@dcavins)

    Hi @bigoldal-

    Thanks for your message. The BP Docs protection query doesn’t run if the post_type has been specified in the WP_Query and the bp_docs post type is not included.
    https://github.com/boonebgorges/buddypress-docs/blob/2.0.x/includes/access-query.php#L325

    It will, however, run if no post_type has been set.

    What kind of posts is the GeoDirectory plugin attempting to find? (Are bp_docs one of the desired types?) Can you provide a sample of what WP_Query looks like when you’re doing a geodir_search?

    Best,

    -David

    Thread Starter bigoldal

    (@bigoldal)

    Hi David,

    The guys at GeoDirectory gave me the following info:

    ============

    Hi Al, try this code snippet

    if(isset($_REQUEST[‘geodir_search’])){
    remove_action( ‘pre_get_posts’, ‘bp_docs_general_access_protection’, 28 );
    }
    Thanks,

    Stiofan

    ==============

    Does this help?

    Thx

    Alistair

    Plugin Author David Cavins

    (@dcavins)

    Hi Alistair-

    Yes, that will remove the BP Docs protection filter when doing a geodirectory search, which could result in private docs being included in the results. I’d say try it and see if you get the results you want.

    From a glance at the plugin’s code, I’m guessing that there’s some way in the GD admin section to set which post types should be included in a GD search. Check that bp_docs aren’t being included.

    -David

    Thread Starter bigoldal

    (@bigoldal)

    Hi David,

    Thanks for this.

    I am not a developer just a ‘brave user.’

    I will send this to Geodirectory and see what they say.

    I will get back to you.

    Thanks again.

    Alistair

    Plugin Author David Cavins

    (@dcavins)

    It pays to be brave! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘BP Docs problems with GD – GeoDirectory website’ is closed to new replies.