<?php wp_get_archives(‘type=postbypost&limit=4′); ?>
<?php if ( is_home() ) { ?><? bloginfo(‘name’); ?> | <?php bloginfo(‘description’); ?><?php } ?><?php if ( is_search() ) { ?>Search Results for <?php /* Search Count */ $allsearch = &new WP_Query(“s=$s&showposts=-1″); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(”); echo $key; _e(‘ — ‘); echo $count . ‘ ‘; _e(‘articles’); wp_reset_query(); ?><?php } ?><?php if ( is_404() ) { ?><? bloginfo(‘name’); ?> | 404 Nothing Found<?php } ?><?php if ( is_author() ) { ?><? bloginfo(‘name’); ?> | Author Archives<?php } ?><?php if ( is_single() ) { ?><?php wp_title(”); ?> | <?php $category = get_the_category(); echo $category<0>->cat_name; | <? bloginfo(‘name’); ?><?php } ?><?php if ( is_page() ) { ?><? bloginfo(‘name’); ?> | <?php $category = get_the_category(); echo $category<0>->cat_name; ?>|<?php wp_title(”); ?><?php } ?><?php if ( is_category() ) { ?><?php single_cat_title(); ?> | <?php $category = get_the_category(); echo $category<0>->category_description; ?> | <? bloginfo(‘name’); ?><?php } ?><?php if ( is_month() ) { ?><? bloginfo(‘name’); ?> | Archive | <?php the_time(‘F, Y’); ?><?php } ?><?php if ( is_day() ) { ?><? bloginfo(‘name’); ?> | Archive | <?php the_time(‘F j, Y’); ?><?php } ?><?php if (function_exists(‘is_tag’)) { if ( is_tag() ) { ?><?php single_tag_title(“”, true); } } ?> | <? bloginfo(‘name’); ?>
<!– this displays related posts, based on tags. If there are no tags, then it’ll disappear. Magic!–><?php if( function_exists(‘the_tags’) )//for use in the loop, list 5 post titles related to first tag on current post$tags = wp_get_post_tags($post->ID);if ($tags) {echo ‘<h2>Related Posts</h2> ‘;$first_tag = $tags<0>->term_id;$args=array(‘tag__in’ => array($first_tag),‘post__not_in’ => array($post->ID),’showposts’=>5,‘caller_get_posts’=>1);$my_query = new WP_Query($args);if( $my_query->have_posts() ) {while ($my_query->have_posts()) : $my_query->the_post(); ?><ul> <li><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></a></li></ul><?php endwhile; }}?>
<?php comments_template(); ?>
function getTinyUrl($url) {$tinyurl = file_get_contents(“http://tinyurl.com/api-create.php?url=”.$url);return $tinyurl;}
<?php$turl = getTinyUrl(get_permalink($post->ID));echo ‘Share on Twitter: <a href=”http://twitter.com/home?status=Reading this – ‘.$turl.’” title=”Send a link to this article on Twitter” target=”_blank”>Send a link to this on Twitter</a>‘?>
โปรดรอ
cymiz.com insurance