up
close

using an older version of IE, huh?

We no longer support older version of Internet Explorer on kohv3. For a better experience try upgrading to a newer version of Internet Explor, Firefox or Chrome.

kohv3 will work in older version but for an enhanced experience, we recommend you upgrade.

close client login

WordPress Hacks: Using Post Excerpts as Meta Descriptions

When you build a static website with a few separate HTML files you find it easy to optimize each page for search engines, load times and meta information. When using a template based application like WordPress, this kind of customization is a bit trickier. But with a few good hacks you’ll be able to easily optimize each page for your needs.

The Problem: WordPress uses the same meta data for each page. The solutions is simple, though:

<?php
//if single post then add excerpt as meta description
if (is_single()) {
?>
<meta name="Description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" />
<?php
//if homepage use standard meta description
} else if(is_home() || is_page())  {
?>
<meta name="Description" content="whatever your blog/site is...
read more...

WordPress Hacks: Related Category Post in WordPress

With a recent project, I wanted to display recent posts, of the same category, on the page. After trying a whole bunch of plugins and not being satisfied I did a little research and testing and made this up. It works pretty well for my needs, but as you'll see, it is quite flexible, and can be utilized for not only categories, but tags also. Quick note, all this code goes inside the loop!

First step was to get the current category, in my case, I wanted the parent category. I used the following to store the category in a variable:

category_parent);
...
read more...