Support » Plugin: ACF: Better Search » Clash with WPML

  • Resolved jessleyland

    (@jessleyland)


    Hi,

    On my site I have found an issue with a clash between WPML (translations) and ACF Better Search. To fix the issue I need to add:

    if( is_admin()) return false;

    to line 20 of app/Search/Init.php to stop the search triggering when you are in the admin.

    The error that occurs is that on all post object or relationship ACF fields on translated pages the field displays blank.

    By adding this line the issue is fixed. I need to make this edit but also want to be able to update your plugin in future without removing the amend. Is there hook or something I could use to do this?

    Thanks,
    Jess

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @jessleyland,

    Thank you for your message.

    By blocking the search in the administration panel, you limit the search for posts in the administration panel.

    However, you are free to manage this by using the following filter:

    add_filter( 'acfbs_is_available', function( $status ) {
      if ( is_admin() ) {
        return false;
      }
      return $status;
    } );
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.