Forums Forums Search & Filter Pro Trouble with get_fields_html

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #31360

    Anyone?
    Anyone?

    Ross Moderator
    #31361

    Please don’t bump – I’m working my way through tickets and will get to this one too.

    Thanks

    Ross Moderator
    #31706

    Hi Stephen

    The active query class is not currently too well documented (as its just been created its subject to change a little) but you can certainly change the output of this field.

    Please take a look at this example:

    $args = array(
    	"str" 				=> '<strong>%1$s</strong>: %2$s',
    	"field_delim" 			=> '<hr />'
    	
    );
    echo $sf_current_query->get_fields_html(array("_sft_category", "_sft_post_tag"), $args);

    You can see str variable is the format output of html for each field, in the example above I’ve added <strong> tags around the name

    The next is field_delim – this is what is used to join the strings for each field – default is <br /> but you can change this to anything.

    I think with these two arguments there should be no issues with formatting the way you want.

    Thanks

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