• Resolved amgS93

    (@amgs93)


    Apologies if you covered this in the readme.txt and I just didn’t get it (and thanks for this plugin!).

    I’m trying to add the Tags dropdown to my search results page–the same one that works in the widget–but I can’t figure out what field I should be passing to facetious to call it. My best guess was “tag”, but that doesn’t seem to work.

    Here’s the code I’m using:

    <?php do_action( 'facetious', array(
    	'submit' => 'Search',
    	'fields' => array(
    		's' => 'Keywords: ',
    		'm' => 'Month: ',
    		'category' => 'Category: ',
    		'tag' => 'Tags: '
    	)
    ) ); ?>

    The search results page I’m working on is here: https://thesockeye.org/search/money/

    https://www.ads-software.com/extend/plugins/facetious/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Hi,

    The name of the actual taxonomy for tags is ‘post_tag’, not ‘tag’. A bit counter-intuitive, I know. Give that a go.

    John.

    Thread Starter amgS93

    (@amgs93)

    Yes! Resolved, thank you so much. The new, working code I’m using (for other people’s benefit) is:

    <?php do_action( 'facetious', array(
    	'submit' => 'Search',
    	'fields' => array(
    		's' => 'Keywords: ',
    		'm' => 'Month: ',
    		'category' => 'Category: ',
    		'post_tag' => 'Tags: '
    	)
    ) ); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding Tags dropdown to search.php’ is closed to new replies.