How to display the_tags() as plain text

I’m glad you figured it out, but below is a quick semantic alteration (swapping your use of $tag singular and $tags plural will help it read closer to what it is doing; functionally it is no different). I also added cases for inside and outside the Loop, and a conditional so you don’t end up … Read more

Best way to show map of tagged posts?

I would suggest rolling your own. Create a metabox that allows posts to store lats and longs on posts. Then create a page that finds all the posts with the tags that you want that can grab the lats and longs from each post meta data. Using that post meta data create a json variable … Read more

How to use the Tag description as the title attribute?

Use get_the_terms() and create a custom array: function wpse_31396_terms_with_desc( $post_id = NULL, $taxonomy = ‘post_tag’ ) { NULL === $post_id && $post_id = get_the_ID(); if ( empty ( $post_id ) ) { return ”; } $terms = get_the_terms( $post_id, $taxonomy ); if ( empty ( $terms ) ) { return ”; } $list = array … Read more

not functioning

I see several things that may be contributing to your issue. First, you’re using a custom page template to display the blog posts index, instead of using home.php as specified by the Template Hierarchy. That might be a problem, because the <!–more–> tag doesn’t work on singular pages, and since you’re doing funky things with … Read more

How can you tie into the tag metabox?

Here’s a workaround specific for the post tags meta box. We can register a custom metabox callback for the post_tag taxonomy with: add_filter( ‘register_taxonomy_args’, function( $args, $taxonomy ) { // Replace the original (post_tag) metabox callback with our wrapper if( ‘post_tag’ === $taxonomy ) $args[‘meta_box_cb’] = ‘wpse_post_tags_meta_box’; return $args; }, 10, 2 ); where our … Read more

how can I use WP_Query to exclude a specific tag.?

Use tag__not_in parameter. You have to use tag ID for this parameter $args = array( ‘category_name’ => $cat_name, ‘tag’ => $tag_name, ‘post__not_in’ => $sticky, ‘tag__not_in’ => array($tag_id_1, $tag_id_2) ); $my_query = new WP_Query( $args );

Display tags in list without link

This would do it… <?php $posttags = get_the_tags(); if ($posttags) { echo ‘<ul>’; foreach($posttags as $tag) { echo ‘<li>’ .$tag->name. ‘</li>’; } echo ‘</ul>’; } ?>

How can I let my audience tag my posts?

Andrew, Matt Mullenweg uses a similar feature on on his blog, Ma.tt, that lets users tag photos. He released the code as a plugin, Matts Community Tags. You will have to create a custom taxonomy for the tags and add some additional code to your templates to make it work. See the discussion on the … Read more

Stop WordPress From Removing HTML Comments In Content

This is due to a very old WordPress HTML Comment bug, that was never fully fixed. You may use Gutenberg, it handles HTML comments better. Also, This Post suggests that placing a beginning HTML comment TAG, just before the ending HTML comment tag works. Like this: <!– some HTML Comment <!– –> This is valid … Read more

What is the difference between terms and tags?

Simple yet tough question, taxonomies are just groups of categories, while terms are just single categories within these groups.* So, for example, if you create a new post and choose category for it – the category itself is a term, and opening YourWordpressURL/wp-admin/edit-tags.php?taxonomy=category you’re going to see all the categories (taxonomy). Terms and Tags are … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)