Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Kim

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Kim in reply to:
    Display multiple terms
    #171986

    Trevor, thanks again for spending time with me today. I really appreciated it.

    Good news, I finally figured it out!

    Here’s the happy code:

    <?php 
    
    	global $searchandfilter;
    	
    	$args = array(
    		"str" 					=> '%2$s', 
    		"delim" 				=> array(", ", " - "), 
    		"field_delim"			=> ', ', 
    		"show_all_if_empty"		=> false 
    	);
     
    $sf_current_query = $searchandfilter->get(99801)->current_query()->get_array();
    $sf_current_style_query = $searchandfilter->get(99801)->current_query()->get_fields_html(array("_sft_style", "_sft_name"),$args);
    $sf_current_cuisine_query = $searchandfilter->get(99801)->current_query()->get_fields_html(array("_sft_cuisine", "_sft_name"),$args);
    	
    echo '<strong>Filters</strong>';
    
    if ( empty($sf_current_query ) ) {
      echo ' &bull; ' . "All" . "<br /><br />";
    } else {
    
      echo ' &bull; ' . $sf_current_query['_sft_category']['active_terms'][0]['name'] . ' &bull; ' . $sf_current_query['_sfm_wpcf-location-city']['active_terms'][0]['name'] . ' &bull; ' . $sf_current_style_query . ' &bull; ' . $sf_current_cuisine_query;
    	echo "<br /><br />";
    }
    ?>

    Cheers!

    Kim in reply to:
    Display multiple terms
    #171852
    This reply has been marked as private.
    Kim in reply to:
    Display multiple terms
    #171735

    Actually, $key[‘active_terms’][0][‘name’] pulls from both the dropdown field (“Market”) and the array (“Cuisines”), so that code wouldn’t be correct. I need the dropdown selection followed by the array.

    Kim in reply to:
    Display multiple terms
    #171733

    Okay, good news, I’m making progress…

    This works for the array:

    <?php 
    
    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(99801)->current_query();
    
    if ( empty($sf_current_query ) ) {
      echo '<strong>Filters</strong>' . ' &bull; ' . "All" . "<br /><br />";
    } 
      else {
        $args = array(
        "str"  => '%2$s', 
        "delim"  => array(", ", " - "), 
        "field_delim"  => ', ', 
        "show_all_if_empty"  => false 
      );
      echo '<strong>Filters</strong>' . ' &bull; ' . $sf_current_query->get_fields_html(array("_sft_cuisine", "_sft_name"), $args);
      }
    	
      echo '<br />';
    ?>

    Now I need to pull in the $key[‘active_terms’][0][‘name’] from the original code (it will display before the array).

    That will give me what I’m after…
    Filters • Florida • Caribbean, Mexican

    How do I combine it?

    Kim in reply to:
    Display multiple terms
    #171721

    I hear you, but that’s a class beyond my current grade.
    Anything you can help with, or…?

    Kim in reply to:
    Display Issue
    #96226

    I found the Zoho script hiding in a widget and that has resolved that issue. However, after installing Cloudflare and WP Rocket, the listings display fine but the corresponding posts trigger a page not found error. Not sure if that was happening before the additions, but Search & filter is calling posts from a custom post type (created via Toolset Types), so I pasted one entry into a normal post and it opens fine. I saw in another support entry that a Toolset Types fix is coming in the next update that could solve the issue (?). If so, if it’s not an imminent update, can you provide a patch?

    Kim in reply to:
    Display Issue
    #94533

    I removed that script but the problem persists.
    The error shows:
    SecurityError: The operation is insecure.
    https://www.snapchops.com/wp-content/plugins/search-filter-pro/public/assets/js/search-filter-build.min.js?ver=2.3.3

    Kim in reply to:
    Display Issue
    #94528

    My apology, the correct link is:
    https://www.snapchops.com/fl-northwest-dining/

Viewing 8 posts - 1 through 8 (of 8 total)