Custom Post Type Taxonomy
-
I have created a custom post type as portfolio_posts using CPT UI plugin. Using the same plugin, i have created a taxonomy named as portfolio_category. I have made multiple entries under this taxonomy. Now i want to list all the entries under portfolio_category and i am doing this in my code
<br />$args = array(<br /> 'taxonomy' => 'portfolio_category'<br /> );<br /> $taxonomy = get_categories ($args);<br /> echo '<br /> <pre>'; print_r($taxonomy); exit; </pre><code></code>
but it return an empty array. when i replace portfolio_category with category i am successfully getting all the entries under category. What am i missing here?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Custom Post Type Taxonomy’ is closed to new replies.