name_like argument using get_tags
-
I’m trying to use get_tags to display tags starting with specific letters. From the get_tags page in the codex, it sounds like I can use the “name_like”argument can do this for me, but it’s not working (by which I mean, it still shows all the tags, not just the ones that start with “a”). I’ve tried every other argument for that function and they all work fine.
Here’s my code. Am I missing something?
$tags = get_tags('name_like=a'); if ($tags) { foreach ($tags as $tag) { echo '<p><a href="' . get_tag_link( $tag->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '>' . $tag->name.'</a> </p> '; } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘name_like argument using get_tags’ is closed to new replies.