Posted in: Newsmag
Jan 26, 2015 at 6:06 pm
Hi,
Edit each module and add the following code: – http://screencast.com/t/9C3OBjKp
function get_the_tags() {
$buffy = '';
$td_post_tags = get_the_tags();
if ($td_post_tags) {
$buffy .= '<ul class="td-tags td-post-small-box clearfix">';
$buffy .= '<li><span>' . __td('TAGS') . '</span></li>';
foreach ($td_post_tags as $tag) {
$buffy .= '<li><a href="' . get_tag_link($tag->term_id) . '">' . $tag->name . '</a></li>';
}
$buffy .= '</ul>';
}
return $buffy;
}
and
<?php echo $this->get_the_tags();?>
Result – http://screencast.com/t/LXiSfg6TQh
Thank you, Emil G.
-
This reply was modified 11 years by
Emil G.
Jan 27, 2015 at 11:01 am
Hi,
I also tested this and Emil’s code works:
Module 1: http://screencast.com/t/cjqP4GFpZg
Module 5: http://screencast.com/t/9BNKc6Qx9
Please make sure that you have tags on post.
Thanks!
Jan 28, 2015 at 12:54 pm
Hi,
Replace the code with this one:
function get_the_tags($post_id) {
$buffy = '';
$td_post_tags = get_the_tags($post_id);
if ($td_post_tags) {
$buffy .= '<ul class="td-tags td-post-small-box clearfix">';
$buffy .= '<li><span>' . __td('TAGS') . '</span></li>';
foreach ($td_post_tags as $tag) {
$buffy .= '<li><a href="' . get_tag_link($tag->term_id) . '">' . $tag->name . '</a></li>';
}
$buffy .= '</ul>';
}
return $buffy;
}
and this:
<?php echo $this->get_the_tags($this->post->ID);?>
Thank you, Emil G.
-
This reply was modified 11 years by
Emil G.
Jan 29, 2015 at 6:33 am
Great! Thank you very much for your help.
I changed it a little bit.
Add the following code to: themedir “\includes\wp_booster\td_module.php” instead of each module.
function get_the_tags() {
$buffy = '';
$td_post_tags = get_the_tags($this->post->ID);
if ($td_post_tags) {
$buffy .= '<ul class="td-tags td-post-small-box clearfix">';
$buffy .= '<li><span>' . __td('TAGS') . '</span></li>';
foreach ($td_post_tags as $tag) {
$buffy .= '<li><a>term_id) . '">' . $tag->name . '</a></li>';
}
$buffy .= '</ul>';
}
return $buffy;
}
and add this to module files:
<?php echo $this->get_the_tags();?>
-
This reply was modified 11 years by
handiso.
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.
