Support » Fixing WordPress » trying to get all tags/multiple taxonomies

  • I have this line on a plugin called “user submitted posts”:
    <?php $tags = get_categories(array('hide_empty' => false)); ?>
    This gives me just the default tags and not the custom taxonomies that I want to get.
    So I tried to change that into some other hook like get_tags or wp_tag_cloud:
    <?php $tags = wp_tag_cloud( array( 'taxonomy' => 'taxonomy1', format => 'list' ) ); ?>
    Then I am able to get the specific taxonomy and not the default tags in the system, but I can’t get multiple taxonomies (taxonomy1, taxonomy2, etc..) and I am also getting it as a cloud and not as a simple list. If I try another hook, it doesn’t work but I want to try anything if you have an idea..

Viewing 4 replies - 1 through 4 (of 4 total)
  • Have you tried using get_taxonomies? It should get custom taxonomies as well as your default tags.

    I didn’t try. Do you know how can I get a few taxonomies and not just one like I am able now.
    I also don’t think that “format – list” is good for me because you can’t pick then. It’s just a list..
    And also maybe it should be get_tags instead of wp_tag_cloud but anyway I couldn’t get all of them together yet..
    Thanks in advance..


    i used get categories array taxonomy array taxonomy names
    if someone need it

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘trying to get all tags/multiple taxonomies’ is closed to new replies.