WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Adding Tags dropdown to search.php

[Resolved] Adding Tags dropdown to search.php

  • 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: http://thesockeye.org/search/money/

    http://wordpress.org/extend/plugins/facetious/

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

    @johnbillion

    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.

    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 ‘[Resolved] Adding Tags dropdown to search.php’ is closed to new replies.