• Resolved mainecampus

    (@mainecampus)


    Right now I’m using the automatic tag link on my site, but it just links to the tags the article is tagged with. I would like it to link to any tag on the site. I tried using wp_tag_cloud with format=array, but it doesn’t return the raw tags — it has the links built it.

    Here’s what’s used right now:
    $tags=wp_get_post_tags($id);
    I’d like to turn it into something like this:
    $tags=wp_get_all_tags();

    [moderated–bump removed. Please refrain from bumping as per Forum Rules]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Like:

    $tags = get_tags();

    Thread Starter mainecampus

    (@mainecampus)

    As far as I know, both get_tags() and get_terms() can not be returned as arrays.

    Did you try it? You want tags without them being ‘linkified’. Be brave, put this right before the <?php if (have_posts()) : ?> in the wp-content/themes/default/index.php file, switch to the WordPress Default theme, visit the blog, and read the results:

    <?php
    $tags = get_tags();
    echo "<pre>"; print_r($tags); echo "</pre>";
    ?>

    Thread Starter mainecampus

    (@mainecampus)

    Sweet, you’re right, it worked. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘All tags in an array w/out links’ is closed to new replies.