I started make my free WordPress themes few days ago. While I said I’ll publish my first theme quickly, I have no time to build it. I began this work on my holiday. Now I ‘ll share some expiriences. First post, I will introduce you some head functions used in wordpress themes and their parameters. (Remember, I said head functions because I used them between <head> and </head> tags.)
All this fuctions can be used like this: <?php wp_title(); ?> where wp_title() is just the functions you want to use.
This functions insists of:
wp_title() //To print your blog title,click here to see parameters
wp_head() //To contain codes produced by plugins, for exmaple, you will see codes produced by plugin “all in one seo pack” here
bloginfo() //gather blog informations(you must set parameter),click here to see parameters
you can use these parameters like this: wp_title(‘sep’, echo, ‘seplocation’);
sep Just the string that will show before or after post title. If you leave it blank, symbol “»” will show.
echo (boolean) To show title (True) or return title as a PHP string (false). Meaningful parameters:1 (True) – default 0: (False)
seplocation 在This is just support wordpress 2.5 or higher. This parameters help to place the sep string. If you set seplocation ‘right’, sep string will show after title, else, sep string will show before title.default location is left.
example:<?php wp_title(‘–‘,true,’right’); ?>
bloginfo() parameters
you can use these parameters like this: bloginfo(‘parameter’)
name– Your blog title, You can set at ‘General setting’。(Default parameter)
description – Your Tagline, set at ‘General setting’
url -blog address URL。
rdf_url -RDF/RSS 1.0 feed URL。
rss_url-RSS 0.92 feed URL。
rss2_url – RSS 2.0 feed URL。
atom_url -Atom feed URL。
comments_rss2_url – URL for comments RSS 2.0 feed.
pingback_url -Pingback (XML-RPC ) URL。
admin_email – email of Administrator, set at ‘General setting’
charset – encoding of your blog,set at ‘Reading setting’, we usually use UTF-8。
version – your wordpress version
parameters just work on WordPress1.5 or higher:
html_type – Content-Type of pages html, usually set as “text/html” 。
wpurl – where you run your wordpress
template_url – template URL。
template_directory – template URL。
stylesheet_url – active CSS URL。
example:<?php bloginfo(’version’); ?> show the version of you wordpress