osadzanie tagów na stronie
Zamieszczenie chmury wszystkich tagów:
<?php if ( function_exists( 'wp_tag_cloud' ) ) : ?> <ul> <li><?php wp_tag_cloud( 'smallest=8&largest=22' ); ?></li> </ul> <?php endif; ?> <?php wp_tag_cloud( 'smallest=15&largest=40&number=50&orderby=count' ); ?>
zamieszczenie tagów konkretnego postu:
<?php $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo '#' . $tag->name . ' '; } } ?>
Hope this helps and happy coding :)
Zobacz jeszcze
get page title by id
<?php echo get_the_title( $ID ); ?> <?php $id=14; $post = get_post($id); $content = apply_filters('the_content', $post->post_content);...