Sunday, 05 July 2009 19:56
Nowadays wordpress bolg is a popular bogging system. Many people use it. To increase your wordpress' popularity, you have to manage your wordpress blog properly. Here are some Tips about managing your word press blog:
Show latest posts in the sidebar
This is something that is quite easy for the user to do themselves, but I find ita very useful feature to build into any theme. It is also very simple and easy to do. Just open up the sidebar.php file and insert the following code to display the latest posts in an unordered list:
<ul>
<?php wp_get_archives('type=postbypost&limit=4'); ?>
</ul>
seo your <title> tag Making your theme 'SEO ready' is another necessity. One of the ways you can make your theme more 'SEO friendly' is be customizing your <title> tag. The code below will make your <title> tag dynamic, changing depending on which page you're on. For example, if you're on the home page it will display 'Blog Name | Blog Description', on a blog page: Post Name | Category Name | Blog Name or on an archive: Blog Name | Archive | Month, Year. That is just naming a few. Check out the source below for the full list.
<?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'); ?>To manage a wordpress blog is very simple and easy task for any our. Here I am going to discus more tips on this post. These tips are narrated below: Change the default gravatar This hack will really make your theme stand out. Give your users the option to change the default gravatar that is shown to users without a gravatar. You"ll need to tell your theme's users how to get this set up. Check out the NomeBlog release page for details how to. It isn't too complicated, it is just this post is getting long enough anyway! In nutshell, you need to upload a .gif image, of about 100xp by 100xp to your theme directory.open up functions.php file and paste the folowing code:
<?php if (!function_exists('fb_addgravatar') ) {
function fb_addgravatar( $avatar_defaults ) {
$myavatar =
get_bloginfo('template_ directory').'/gravatar.gif;
//default avatar
$avatar_ defaults[$myavatar] = 'Exciting new
gravtar';
return $avatar_defaults;
}
add_filter( 'avatar_defaults', 'fb_addgravatar' );Display related posts This is a great little feature to have in your theme that seves the theme user using yet another plugin if there are no tags.
<!--this displays related posts, based on tags. If there are no tags,
Then it'l disapper. Magic!-->
<?php if(function_exists('the_tas'))
//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_attribut(); ?>"><?php
the_title(); ?></a></li></ul>
<?php endwhile;}}?>
In future post, I will discuss more Tips about managing word press blog.

Click Here Web Design Every great business idea takes wings with the launch of a professionally designed website. e-commerce Ecommerce is an agile and trusted business solution.













