Hi everyone, I am trying to list my custom taxonomies with get_categories() function. It's working fine in page.php file but it's not working in function.php file. If i won't use any query string in the function, it's listing my post categories fine in function.php. What's wrong? Need help ASAP, thanks.
My code;
<br />
print_r(get_categories('taxonomy=slideshow-categories&post_type=slideshow'));<br />
The result in function.php (not working);
<br />
Array<br />
(<br />
[errors] => Array<br />
(<br />
[invalid_taxonomy] => Array<br />
(<br />
[0] => Invalid Taxonomy<br />
)</p>
<p> )</p>
<p> [error_data] => Array<br />
(<br />
)</p>
<p>)<br />
The result in page.php (working fine);
[code moderated - please follow the forum guidelines for posting code]