How to display tags with post_content
Simply use get_the_tags($my_id), example : $posttags = get_the_tags($my_id); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ‘ ‘; } } Refering to WordPress codex
Ok, thank you all who wanted to help. My final code (based on https://goo.gl/c55S3v and it is working perfectly): $this_tag = get_queried_object(); $all_tags = get_tags(); foreach( $all_tags as $position => $tag ) : if( $this_tag->term_id == $tag->term_id ) : $next_tag_pos = $position + 1; $prev_tag_pos = $position – 1; break; endif; endforeach; $prev_tag_pos = $prev_tag_pos … Read more
OK finally found the solution. After looking in wp_term_taxonomy table, I noticed that taxonomy column describes the taxonomy term for tags – which is actually post_tag, not just ‘tag’. So, this works: add_filter(‘rest_prepare_post_tag’, ‘wp_api_encode_yoast’, 10, 3); Hopefully someone will be helped by this.
Checking in Github and Stackoverflow, I found this way: wp.data.select( ‘core’ ).getEntityRecords( ‘taxonomy’, ‘<taxonomy_slug>’, { per_page: -1, page: 1 } ) In my case the taxonomy slug is post_tag. So I was able to retrieve all the tags from my website using: select( ‘core’ ).getEntityRecords( ‘taxonomy’, ‘post_tag’, { per_page: -1, page: 1 } )
This is the notation of the (pretty old) Plugin qtranslate. It was abandoned way back and replaced by mqtranslate and later qtranslate-x, which at this point are also abandoned. You can however convert your content to be used with wp multilang, which works with gutenberg, by replacing the <!–:lang–> tags with kinda shortcodes [:lang]. So … Read more
I think you have two options on how to use the functions you’ve found. The first one is to add one of the functions to your single post template file. pew_related( array(), // add custom parameter key=>value pairs, if needed get_the_ID(), ” // not sure what is the purpose of the third parameter ); or … Read more
If you have a term, you can retrieve its meta via get_term_meta, this function works the same way as get_post_meta only it takes a term ID not a post ID E.g. if ( get_term_meta( $term_id, ‘key’, true ) === ‘value’ ) { // it has the value } Once you know this, it’s just basic … Read more
First you need to get the ID of the page/post/content you’re viewing. Then, you can call get_the_terms() and pass it that ID so it knows you want the tags for that specific piece of content. <?php $mtags = get_the_terms( get_queried_object_id(), ‘custom_tag’ ); ?> There isn’t an orderby parameter, so you may need to sort the … Read more
Simply use get_the_tags($my_id), example : $posttags = get_the_tags($my_id); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ‘ ‘; } } Refering to WordPress codex
edit tag.php (or archive.php if tag.php does not exist) and look for the_excerpt(); – exchange it with the_content(); codex the_excerpt() codex the_content()
check this plugin: http://wordpress.org/extend/plugins/most-popular-tags/ And/ or see this codex: http://codex.wordpress.org/Template_Tags/wp_tag_cloud