Optimal Title Plugin

Written on 31 January 2008 – 6:11 pm | by - rapihdhoho |

As we know that title is one of parameters in site that influence how search engines grab information from our site. Specially for placing ads in our site.

But unfortunately mostly of CMS do not really support about this except wordpress of course :) The solution is just try to customize your site’s tittle :) Because i’m using wordpress, i’ll share my experience in modifying wordpress tittle using plugin “Optimal Title” by Aaron Schaefer. You can download this plugin here or you can copy paste the code here :

/*
Plugin Name: Optimal Title
Plugin URI: http://elasticdog.com/2004/09/optimal-title/
Description: Mirrors the function of wp_title() exactly,
but moves the position of the 'separator' to after the title
rather than before.
Version: 3.0
Author: Aaron Schaefer
Author URI: http://elasticdog.com/
*/

function optimal_title($sep = 'ยป', $display = true) {

    // get the standard wordpress-generated title
    $title =  wp_title($sep, false);

    // split the title by the 'separator'
    $sections = explode(" $sep ", $title);

    // move the first section to the end of the array
    array_push($sections, array_shift($sections));

    // put the array back together in the modified order
    $optimal_title = implode(" $sep ", $sections);

    // send out the generated optimal title accordingly
    if ($display) {
        echo $optimal_title;
    } else {
        return $optimal_title;
    }
}

Happy nice trying this plugin :)

Related Posts

RSS feed | Trackback URI

Comments »

No comments yet.

Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> in your comment.

Quote of The Day

Different is not always better. But the BEST is always different.

Berbeda tidak selalu lebih baik. Namun yang terbaik selalu berbeda. Hanya dengan bekerja cerdas berlandaskan kemurnian hati dan akal sehat yang proporsional, kita dapat mewujudkan kesejahteraan maksimal.

--
John Sifonis


 Subscribe in a reader Or, subscribe via email:
Enter your email address:  
Find entries :