Bert Vierstra Blog

Bert Vierstra Home

   
Ad

May 16, 2005

Previous : Sony DVD Handycam Aspect Ratio    Next : I wonna post HTML code

My Template for Wordpress

Filed under: Web Activities, PHP Stuff — Gede @ 9:01 am

I was not very satisfied with how Wordpress handled the titles of the pages, so I changed it a bit. I give you the code here, maybe its useful to you:

<meta http-equiv="Content-Type" content="< ?php bloginfo('html_type'); ?>; charset=< ?php bloginfo('charset'); ?>" />
< ?
if (is_category() OR is_date()) {
$tit = get_bloginfo('name') . " - " . wp_title("","") ;
} else {
if (is_home()) {
$tit = get_bloginfo('name') . " a nerd BLOG from Bali, spidering my own web";
} else {
$tit = wp_title("","");
}
}
$tit = str_replace("2005 ", "Two Thousand Five ", $tit);
$tit = str_replace("2006 ", "Two Thousand Six ", $tit);
$tit = str_replace("2007 ", "Two Thousand Seven ", $tit);
$tit = str_replace("2008 ", "Two Thousand Eight ", $tit);
$tit = str_replace(" ", "", $tit);
$kw = get_bloginfo('name').wp_title("","") ;
$kw = str_replace(" ", ",", $kw);
$kw = str_replace(" ", ",", $kw);
$dsc = get_bloginfo('name')." writes about" . wp_title("","");
$dsc = str_replace(" ", " ", $dsc);
?>
<title>< ? print $tit; ?>
<meta name="keywords" content="< ?php print $kw; ?>">
<meta><meta name="description" content="<? print $dsc; ?>"></meta>

-

4 Comments

  1. Nice tweak! I just got my wordpress blog started, still have to mess around with it myself. Your blog looks great!

    Comment by Lady78 — May 16, 2005 @ 9:40 am

  2. Thanks, still need to do something about readability and so…and I just noticed that I need to replace < with & lt ; or else html doesn’t show… and the rest of the page gets messed up….

    Comment by Gede — May 16, 2005 @ 9:48 am

  3. I tweaked a very simple template from wordpress and integrated it into my site :-) . Basically I just copied the php code out and pasted it into my template.. adjusted the css a little bit and this is what i get

    http://www.comoxvalleyslopitch.com

    Comment by riotctrl — April 27, 2006 @ 12:37 pm

  4. Forgot to mention the template that I used as my sample is this one here :

    http://managedtasks.com/wpthemes/blog/index.php?wptheme=Simple+Green

    Comment by riotctrl — April 27, 2006 @ 12:40 pm

Leave a comment

You must be logged in to post a comment.




Categories:

Random Thoughts
Web Observations
Web Activities
Digital Camera Department
PHP Stuff
Internet Marketing
Windows XP
Mobile Phones
Panorama Pictures


Archives:

June 2007
September 2006
May 2006
February 2006
October 2005
July 2005
June 2005
May 2005


My Sites

Bali Web Home
BPI Properties in Bali
Bali Hotels Lovina
Panotools 360
Bali News and Info
Lovina Bali Spa
Bali Golf House
Bert Vierstra
Malaysia Pictures
de Praktijk




Login



XML Feed

RSS






- Bali Web Design Indonesia -

The Web Writers Writings - WordPress -