Use get_categories() in function.php
-
Hi,
I want to create responsive design for my WP so I want to create custom dropdown category theme for mobile devices. I have got code which actually working but now I want to create function in file functions.php so I can call this custom dropdown menu wherever I want.So far I have got this code http://pastebin.com/bcrLAYhi
If I copy code within function to template file it is working but when I call the function from functions.php file it isnt generating any <option> tags.
Could someone get me some hint how to edit this function so it can reach categories used in my WordPress instance? I assuming that function get_categories() is not working properly in functions.php
The topic ‘Use get_categories() in function.php’ is closed to new replies.