WordPress.org

Ready to get started?Download WordPress

Forums

trying to get all tags/multiple taxonomies (5 posts)

  1. tomystein
    Member
    Posted 2 years ago #

    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..

  2. dkotter
    Member
    Posted 2 years ago #

    Have you tried using get_taxonomies? It should get custom taxonomies as well as your default tags.

  3. tomystein
    Member
    Posted 2 years ago #

    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..

  4. tomystein
    Member
    Posted 2 years ago #

    ??

  5. tomystein
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags