Taxonomy Dropdown Widget
[resolved] Not seeing dropdown when used outside of the sidebar (2 posts)

  1. vincecusomato
    Posted 4 years ago #

    I uploaded the functions file to plugins and activated the plugin with wp.
    I am not using a sidebar but rather a custom theme.
    I have inserted this function and many variations (for possible syntax errors) into the spot I want the dropdown:

    <?php if( function_exists( 'taxonomy_dropdown_widget' ) ) taxonomy_dropdown_widget( 'post_counts=true', 1 ); ?>

    It doesn't return anything. I tested and the function does exist.

    URL: http://wxtvonline.org/episodes/
    dropdown tag list should appear at top of page next to "Search by keyword: "

    Am I doing something wrong?



  2. Erick Hitter
    Code Wizard
    Plugin Author

    Posted 3 years ago #


    The problem is twofold. First, my documentation was incorrect. The function taxonomy_dropdown_widget() returns its value, so to display it, you must echo the function. I'll correct that oversight in a future release.

    Second, the function accepts an array as its first parameter, not a query string as other WordPress functions do. I should probably change that. :)

    Without the opportunity to test it, the updated code below should work for you.

    <?php if( function_exists( 'taxonomy_dropdown_widget' ) ) echo taxonomy_dropdown_widget( array( 'post_counts' => true, 1 ); ?>


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Taxonomy Dropdown Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic