The object returned by get_tags()
should have a description
property, so you don’t need to try to get it again. Just check to be sure $tags->description
isn’t empty. You should probably also reorganize so that you don’t do anything at all unless if($tags)
. Thus:
// Get ALL the tags!
$tags = get_tags( array( 'hide_empty' => false ) );
if ($tags) {
foreach ($tags as $tag) {
if ($tag->description) {
echo '<dt><a href="' . get_tag_link( $tag->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '>' . $tag->name.'</a></dt><dd>' . $tag->description . '</dd>';
}
}
}
Related Posts:
- The Difference Between Hierarchical and Non-Hierarchical Taxonomies?
- Remove the category/taxonomy description field?
- How to have “the most used tags” taxonomy always expanded?
- Search for tags
- WP native tag suggest metabox. How does it process tag id?
- Change order of WordPress tag cloud
- Unable to delete a Category and Tag that share same slug
- How do I get the current tag out of a taxonomy?
- WordPress as thesaurus/dictionnary: what approach?
- Set attachment tags from attachment’s custom field data
- Adding tag’s featured image to tag archive
- How to restrict users in edit post that can just select exists tags? not add new
- How to sync to custom taxonomies (tag structure)
- Taxonomy Tag Conditionals
- Why does WP_Query strip colons from tag names?
- Advice on how to build multiple cross-tagged content types
- Categorize wordpress tags
- How to make tags show up in search results?
- Sorting tags by name
- Tags hierarchical
- Calling an Archive Page with specific Tag/Tax ID
- I want to edit the tags template by adding text that displays all tags from the listed posts
- show recently added tags to tag cloud
- Get Term ID by Description
- “If an object equals a term id then return the term name”
- how to print post tags [duplicate]
- Recent posts by taxonomy and filter by tag
- How to change value in wp-include/taxonomy.php without exchanging the WordPress-core
- Add a tag like a post
- How do I add tags/taxonomy to images + a query field on page to query ‘albums’ (images with same tag/taxonomy)
- Description of a sub-taxonomy
- Custom Titles for Multiple Tag Taxonomy Page
- Hiding a tag from display
- How to show a hierarchical terms list?
- Why does get_term() require taxonomy? Are term_ids not unique?
- Control term order on a per-post basis
- WordPress – Creating multiple versions of the same single-customtype.php depending on selected taxonomy categories
- Exclude custom taxonomy from search results and archive pages
- get_terms with posts that have a different taxonomy with term x
- check if tag exists in wp database
- How to update taxonomy custom field with wp_update_term()?
- Add Thumbnail to wp_list_categories()
- Display Post by taxonomy and taxonomy child
- Fatal error: Call to undefined method stdClass::filter() in wp-includes\taxonomy.php on line 805
- How do I display a tag cloud with both post tags AND a custom taxonomy?
- Let users create a new custom taxonomy entry from frontend (without creating a post)
- WordPress built-in method to extract array of term IDs?
- How to Retrieve a Taxonomy Term’s ID?
- Why does querying on post_tags (which has been applied to custom post types) only return posts?
- Why “Warning: Invalid argument supplied for foreach()”
- Search Posts / Pages with multiple options?
- Order custom Taxomony alphabetically and reversal after clicking a button?
- Set multiple Post Terms in same Taxonomy
- Custom Tag Description unable to display just below and outside of the Loop
- WordPress Customizer – pass setting value into another control to live update drop-down choices
- custom post type and taxonomy url rewrite without tax-name
- Show child terms of current term of the taxonomy
- Display specific taxonomy
- add upload image to default taxonomy
- How to get custom field value in frontend for taxonomy
- Comma separated tax terms, with “and” before last item [duplicate]
- How to add and display a taxonomy term image in any template? (Taxonomy Images)
- Get Link to Feed On Term or Taxonomy
- Creating links to a page displaying posts from a particular category
- HTML in category name
- How to get my register taxonomy
- How can I completely hide a taxonomy term from “frontend”? [closed]
- How to display taxonomy term custom meta (using wp_get_object_terms?)?
- How to get if child category of this category is empty?
- Adding inline help to category/taxonomy checkboxes in admin sidebar
- Automatically show ‘taxonomy’ meta box by default in Appearance > Menus?
- Retrieve all term IDs of post
- update_term_meta not working
- Getting more info about the taxonomy?
- Assign Multiple Values from Post Fields to Taxonomy Terms
- How to make HTML select options searchable
- Why doesn’t ‘post__not_in’ work with ‘cat’?
- Order custom taxonomy hierarchy
- Including taxonomy in searches
- I want to change the slugs of my terms dynamically
- taxonomy_edit_form_fields output after term fields
- Make/create a category for every page
- All tag/category/custom taxonomy archives 404
- Get a specific category in multiple categories
- $product->ID in has_term() not working, but manually inputting the ID works, why?
- how do you get one specific term from a shortcode attribute?
- How to customize taxonomy edit page
- Fatal error Call to a member function filter()
- Using is_tax with multiple taxonomies
- Taxonomy pages, stop them indexing or being generated?
- How to list all names and descriptions of a custom taxonomy
- Pages throwing 404 error on server load
- Access WordPress Tag Function From Modal
- Display yesterday’s last post’s Custom field from Unique terms of one Taxonomies
- Apply custom taxonomy archive template to children
- Why does my taxonomy code display the first alphabetical term?
- Custom Taxonomy link out the loop
- Any way to make custom taxonomy field searchable?
- IF taxonomy archive is hierarchical THEN
- taxonomy change to post/page type