Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author TC.K

    (@wp_dummy)

    You can refer to this post, at the FAQ section.

    Thread Starter itivae

    (@itivae)

    Hi. Thanks for taking the time to reply. I reviewed the link you posted but I am not sure how to sub in the ‘Search All’ text. I am assuming that this is the block that needs editing. Could you recommend how to make it use the “Search All” Text from admin?

    if(isset($_GET['taxo']) ){
     	 $taxterms = $_GET['taxo'];$sterm2 = '';
    	foreach( $taxterms as $v){
    	if(isset($v['term']) && $v['term'] !='wqsftaxoall')//exclude 'all text' in taxonomy term.  You can use to display it with other text you like by responding the taxonomy. exp if($v['term'] =='wqsfcmfall' && $v['name'] == 'responding meta key'){$sterm[] = 'All cities' ; }
    	 {$sterm2 = $v['term'];}
    	}
    	if(is_array($sterm2)){
    	$searchterm2 =  implode(", ", $sterm2);}//you can implode with your value as well. But this applied with all values (including null value)
    	else{$searchterm2 = $sterm2;}
    Plugin Author TC.K

    (@wp_dummy)

    Do you want it to show Search All only? If so, you just need return "Search All" will do.

    Thread Starter itivae

    (@itivae)

    Hi. No I want to sub in whatever text is put into the “Search All” (taxonomy) text in the admin panel for this plugin.

    Plugin Author TC.K

    (@wp_dummy)

    Try this:

    if(isset($_GET['taxo']) ){
     	 $taxterms = $_GET['taxo'];$sterm2 = '';
    	foreach( $taxterms as $v){
    	  if(isset($v['term']) && $v['term'] !='wqsftaxoall'){
                $sterm2 = $v['term'];
               }
    
               if($v['term'] =='wqsfcmfall' && $v['name'] == 'cities')
                  {$sterm2[] = 'All cities' ; }//here you can sub in your Search All text, by refer for different taxonomy slug $['name']; So if your taxonomy is state, the conditional check is  $v['name'] == 'state', or taxonomy "product-cat" , $v['name'] == 'product-cat'
    
    	}
    	if(is_array($sterm2)){
    	$searchterm2 =  implode(", ", $sterm2);}//you can implode with your value as well. But this applied with all values (including null value)
    	else{$searchterm2 = $sterm2;}

    Thread Starter itivae

    (@itivae)

    Hi thanks for taking the time to try and help. I have a couple questions:

    1. is the name $v['name'] the label in the admin?
    2. If I want to do multiple “Search all” i.e. “All Meals”, “All Food Types”, and “All Categories” do I just add ifelse statements to the above?

    Thanks.

    Plugin Author TC.K

    (@wp_dummy)

    Yes, you can use the conditional style (if..else or switch case) to do it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Search All not displaying title’ is closed to new replies.