WordPress.org

Ready to get started?Download WordPress

Forums

Facetious
[resolved] Adding Tags dropdown to search.php (3 posts)

  1. amgS93
    Member
    Posted 2 years ago #

    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/

  2. John Blackbourn
    WordPress Core Developer
    Plugin Author

    Posted 2 years ago #

    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.

  3. amgS93
    Member
    Posted 2 years ago #

    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: '
    	)
    ) ); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.