Forums Forums Search & Filter Pro Some issues using plugin backend

Viewing 9 posts - 11 through 19 (of 19 total)
  • Anonymous
    #85172

    Dear Ross

    it works in the main functions.php (wp-includes/funcions.php). Is this save for wordpress updates? If I put it into child-theme function it does not work.

    Until now thanks for your goog work.

    Best Regards Marc

    Trevor
    #85175

    Hey Christian. It should not go into that file. It should go into your child theme functions.php file (I usually put new scripts at the end).

    Putting it in the file you have will be overwritten with the next WP update, and putting it in the main theme functions.php will be overwritten at the next theme update.

    It may be that you have to experiment with changing the priority number (11 in the sample code) to higher or lower to see.

    Anonymous
    #85177

    Sorry Ross forgot that I deactivate shortime caldera. It does not work, either child-themes functions.php or wp-includes/funcions.php.

    Any ideas?

    Best Regards Marc

    Trevor
    #85181

    I think I see the error. There is a hyphen missing in the script name, so try this:

    function remove_caldera_from_search_filter($hook) {
    	
    	$search_filter_admin_screens = array("edit-search-filter-widget", "search-filter-widget", "search-filter_page_search-filter-settings", "search-filter_page_search-filter-licence-settings", "search-filter_page_search-filter-system-status" );
    	$screen = get_current_screen();
    	
    	if(in_array($screen->id, $search_filter_admin_screens))
    	{//we are on S&F admin so remove caldera JS to avoid conflict
    		wp_deregister_script("caldera-forms–-shortcode-insert");
    	}
    }
    
    add_action( 'admin_enqueue_scripts', 'remove_caldera_from_search_filter', 11 );

    It is this line:

    wp_deregister_script("caldera-forms–shortcode-insert");

    should be this:

    wp_deregister_script("caldera-forms–-shortcode-insert");

    Anonymous
    #85185

    Dear Trevor

    still no effect. Tried again several priorities with your updatet code. No change in behaviour of search & filter PRO while caldera is activated.

    Best Regards Marc

    Trevor
    #85195

    Interesting. The github support request you made has the double dash/hyphen, but this page does not:

    https://calderaforms.com/doc/remove-caldera-forms-shortcode-button-post-editor/

    It also says that you should remove the button as well.

    function remove_caldera_from_search_filter() {
    	
    	$search_filter_admin_screens = array("edit-search-filter-widget", "search-filter-widget", "search-filter_page_search-filter-settings", "search-filter_page_search-filter-licence-settings", "search-filter_page_search-filter-system-status" );
    	$screen = get_current_screen();
    	
    	if(in_array($screen->id, $search_filter_admin_screens))
    	{//we are on S&F admin so remove caldera JS to avoid conflict
    		wp_deregister_script("caldera-forms–shortcode-insert");
    	}
    }
    
    add_action( 'admin_enqueue_scripts', 'remove_caldera_from_search_filter', 15 );

    Let’s try it without the $hook

    Anonymous
    #85220

    Dear Trevor

    as I see you made it. I only had to remove the double dash –> without, this one works. Hope this solve the problem properly.

    Thanks for your support

    Marc

    wp_deregister_script("caldera-forms-shortcode-insert");

    Trevor
    #85232

    It works then?

    Without the double dash and with the $hook?

    I will edit my post now.

    I can close this thread?

    Anonymous
    #85249

    Yes Trevor think your solution works. Fine support! Best Regards Marc

Viewing 9 posts - 11 through 19 (of 19 total)