Optimize WordPress title style without All in One SEO
Most guys see All in One SEO Pack which is ranked first in the downloaded ranking. Well, No.1 is a lot more attractive of course, but popSOHO didn’t follow that. Carefully studying the plug-in, we can find the following functions of it as below:
- Add independent descriptions and keywords manually.
- Generating article excerpts automatically.
- Avoid repeated crawling by search engines.
All of functions above can easily achieved by small changing of WP codes, which in addition reduces the negative effect of using a plugin. Some WP versions did that for users, and some other templates like inove didn’t. We today show the steps of that kind of optimizing.
- Title optimizing
Find the codes as following, usually in your header.php file:
| <title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title> |
or codes are similar to them with the tag <title> and</title>. Then replace the codes by following:
| <?php if (is_home () ) { echo $description; echo ” – “;bloginfo(‘name’); } elseif ( is_category() ) { single_cat_title();echo ” – “; bloginfo(‘name’); } elseif (is_single() || is_page() ) { single_post_title(); echo ” – “; bloginfo(‘name’); }elseif (is_search() ) { bloginfo(‘name’); echo “search results:”; echo wp_specialchars($s); } else { wp_title(”,true); } ?> |
Now you get the same title style as popSOHO.om.
- Meta optimizing
Of course, you should also define the meta as following:
| <?php if (is_home() || is_page()) { $description = “Top Keys to Online Earning and Best Tips for Online Shopping”; $keywords = “popsoho, make money online, SEO”; }// replace by your own description and keyword of course. elseif (is_single()) { $desc = “description”; $key = “keywords”; $description = get_post_meta($post->ID, $desc, true); $keywords = get_post_meta($post->ID, $key, true); } elseif (is_category()) { $text = category_description(); $description = strip_tags($text); } $description = str_replace(array(“\r\n”,”\r”,”\n”,” ”),”",$description); $keywords = str_replace(array(“\r\n”,”\r”,”\n”),”",$keywords); ?> <meta name=”description” content=”<?php echo $description; ?>” /> <?php if ( !is_category() ) { ?> <meta name=”keywords” content=”<?php echo $keywords; ?>” /> <?php } ?> <?php if ( is_category() ) { ?> <meta name=”keywords” content=”<?php wp_title(‘ ‘); ?>” /> <?php } ?> |
Add codes above between the php tags <head> and </head>, and you’d better let the codes before the <title> tag mentioned above when optimizing the title.
Now you can define your own description and keyword metadata in the Custom Fields. After all that steps, you can add description and keyword respectively for each article before your posting.
- Avoid repeated crawling by search engines
Merry Christmas and enjoy your work!
Nice. I’ll use that at my web-page
valorolo dot ru – cool java games! Отличные ява игры!
Great idea, but will this work over the long run?
No problem.
Good brief and this mail helped me alot in my college assignement. Gratefulness you for your information.
http://www.popsoho.com; You saved my day again.
Hey it
I really like your writing style, its not generic and extremly long and tedious like a lot of blog posts I read, you get to the point and I really enjoy reading your articles! Oh, and merry Christmas!
Please, can you PM me and tell me few more thinks about this, I am really fan of your blog…gets solved properly asap.
Thought I would spend time to read and comment on most of your articles today as the weather is so shocking
To start earning money with your blog, initially use Google Adsense but gradually as your traffic increases, keep adding more and more money making programs to your site.