Thread: Tech Wordpress question
View Single Post
Old 02-15-2016, 10:30 AM  
druid66
Confirmed User
 
Join Date: Feb 2006
Posts: 994
i googled and i found this piece of code:

To get a list of only the tag IDs for a particular post:

Code:
global $post;
$tag_ids = wp_get_post_tags( $post->ID, array( 'fields' => 'ids' ) );
i should insert it somewhere inside
wp_get_post_tags() which is located in wp-includes/post.php

is that correct?
how to call it inside post?

tried this one:
<?php wp_get_post_tags( $post_id, $args ) ?>

but effect is blank space

ed.: ok, ive tried different code:

<?php
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) {
echo $tag->name . ' ';
}
}
?>

but it displays tags with no links, but i'm getting close :D

ed2.: with this code i'm getting what i wanted

<?php the_tags( 'Tagged with: ', ' • ', '<br />' ); ?>

now i need to find how to add tag counts.
__________________
Pure Japan japanese babes blog
druid66 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote