Tag Dropdown
-
I need to create a dropdown list with tags in the header of the theme. Please help.
The tutorial from WPHacks is giving me a blank page error.
-
Use
wp_dropdown_categories(), it does support changing which taxonomy to select terms from.
http://codex.wordpress.org/Template_Tags/wp_dropdown_categoriesSimply set the taxonomy to
post_tag, and plonk in any other args/params you want.Or if you really want to see the WP hacks site tutorial, you can usually get round issues not being to see the page by using googles cache.
webcache.googleusercontent.com/search?q=cache:lkxfsnu5tf4J:wphacks.com/how-to-display-wordpress-tags-dropdown-menu/
I can see the page from WpHacks, but when I implement it on my blog, it gives me a lot of errors when accessing the wp-admin area. Thanks, I’ll try that.
How exactly do I change the taxonomy? You see, I’m using the tag dropdown list in the header of the template. I implemented the tutorial from WPHacks, and here are the errors I get after I press login on wp-login.php:
Warning: Cannot modify header information - headers already sent by (output started at /home/content/11/5713411/html/CupciniCity/wp-content/themes/the-view-wp/functions.php:16) in /home/content/11/5713411/html/CupciniCity/wp-login.php on line 302 Warning: Cannot modify header information - headers already sent by (output started at /home/content/11/5713411/html/CupciniCity/wp-content/themes/the-view-wp/functions.php:16) in /home/content/11/5713411/html/CupciniCity/wp-login.php on line 314 Warning: Cannot modify header information - headers already sent by (output started at /home/content/11/5713411/html/CupciniCity/wp-content/themes/the-view-wp/functions.php:16) in /home/content/11/5713411/html/CupciniCity/wp-includes/pluggable.php on line 665 Warning: Cannot modify header information - headers already sent by (output started at /home/content/11/5713411/html/CupciniCity/wp-content/themes/the-view-wp/functions.php:16) in /home/content/11/5713411/html/CupciniCity/wp-includes/pluggable.php on line 666 Warning: Cannot modify header information - headers already sent by (output started at /home/content/11/5713411/html/CupciniCity/wp-content/themes/the-view-wp/functions.php:16) in /home/content/11/5713411/html/CupciniCity/wp-includes/pluggable.php on line 667 Warning: Cannot modify header information - headers already sent by (output started at /home/content/11/5713411/html/CupciniCity/wp-content/themes/the-view-wp/functions.php:16) in /home/content/11/5713411/html/CupciniCity/wp-includes/pluggable.php on line 868How exactly do I change the taxonomy?
wp_dropdown_categories( array( 'taxonomy' => 'post_tag' ) );I implemented the tutorial from WPHacks, and here are the errors I get after I press login on wp-login.php:
Sounds like an issue with placement of code. If you want help checking it’s placed correctly, copy all the code of the file you pasted the wphack code into, and paste it into a pastebin, then provide the link back here please.
Here is what I have in my functions.php:
http://wordpress.pastebin.com/DYbse2T5And my header.php:
http://wordpress.pastebin.com/zVyHTMUVI’ve also tried copying this part:
<div class="date-issue"> September, 2009 <span class="issue">Edition #10</span> <select name="tag-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;"> <option value="#">Select Edition</option> <?php dropdown_tag_cloud('number=0&order=asc'); ?> </select> </div>at the beginning of index.php but unfortunately the errors remain.
Thank you for your help.Copy and pasted the code for testing, seems to work just fine for me.
Can you try with plugins disabled?
I have all the plugins disabled, on a clean wp install with just a couple posts.
I get the error page after I press login on wp-login.php, did you try that?
Nope, but i’ve given it a shot (thinking you’d caught the issue)..
Still works as expected.. i’ve also tried the 2.9 install, i’ve been testing the 3.0 install up until now.
Still works … :-s
NOTE: I also have debugging on to, so i certainly can’t see anything being wrong with the code..
Additional note: Try removing the closing PHP tag from your functions file.. (don’t worry it’s not required for PHP files), ie. the last
?>Still can’t figure it out. Can we talk somewhere in private? (Like PM which does not exist here…)
Yeps!! I think everything works fine now. The problem was that I had a clean text line between 2 PHP sequences.
Thanks.I finished with one problem and now I have another one. Will the tag dropdown work if the content is first filtered by category?
It should do, what makes you think it wouldn’t?
It does not for me. I have 3 columns of content on my page, each column divided in 3 boxes. Every box from every column shows a predefined category. Now, I have put the tag dropdown in the header and it does not work. When I change the tag in the list it does nothing…
Is it possible to provide a URL to a page with the problem?
The Page: http://paulsanduleac.com/CupciniCity/
The topic ‘Tag Dropdown’ is closed to new replies.