In this guide I'm going to put some PHP tags that are very useful when making your wordpress templates, will be divided into:
Useful anywhere on the templates: These are codes that you can call from any php file in your templates.
Useful in "the loop" code specifically useful for the section called loop, which is what allows you to call the entries.
a) Attributes of language: Displays the default language for your blog (of the type en-GB or en-EN)
1
| ; ?> <? php language_attributes ();?> |
b) Blog Description: Displays the description of your blog (set when creating the same)
1
| 'description' ) ?> <? php bloginfo ( 'description')?> |
c) Blog Name: Displays the name of your blog (configured when creating the same)
1
| 'name' ) ; ?> <? php bloginfo ( 'name');?> |
d) Style of your theme: Displays the URL of the stylesheet of your theme
1
| 'stylesheet_url' ) ; ?> <? php bloginfo ( 'stylesheet_url');?> |
e) RSS of your blog: Displays the address of your blog RSS
1
| 'rss2_url' ) ; ?> <? php bloginfo ( 'rss2_url');?> |
d) Your blog Pingback: Displays the URL of your blog PingBack
1
| 'pingback_url' ) ; ?> <? php bloginfo ( 'pingback_url');?> |
e) Header: Shows some header data (needed for many Plugins)
1
| ; ?> <? php wp_head ();?> |
f) URL of your blog: Displays the URL of your blog.
1
| get_option ( 'home' ) ; ?> <? php echo get_option ( 'home');?> |
and also serves the following
1
| 'url' ) ; ?> <? php bloginfo ( 'url');?> |
g) Call template files: You can call from anywhere in your template file, another file to download. (For example, since the sidebar call file search)
1
| ( TEMPLATEPATH . '/nombre_de_archivo.php' ) ; ?> <? php include (TEMPLATEPATH. '/ nombre_de_archivo.php');?> |
h) Current Date: Current date display
1
| 'l, F jS, Y' ) ; ?> <? php the_time ( 'l, F jS, Y');?> |
i) List of pages: Displays a list of pages published
1
| 'title_li=<h2>Pages</h2>' ) ; ?> <? php wp_list_pages ( 'title_li = <h2> Pages </ h2>');?> |
j) File List: Displays a list of files published (monthly).
1
| 'type=monthly' ) ; ?> <? php wp_get_archives ( 'type = monthly');?> |
k) List of Categories: Displays a list of all your blog caractegorias
1
| 'show_count=1&title_li=<h2>Categories</h2>' ) ; ?> <? php wp_list_categories ( 'show_count = 1 & title_li = <h2> Categories </ h2>');?> |
l) Registration Link: Displays the link for your users to register.
1
| ; ?> <? php wp_register ();?> |
m) Logon Link: Displays the link to your users log on.
1
| ; ?> <? php wp_loginout ();?> |
n) Wordpress Version: Displays the current version you use Wordpress
1
| 'version' ) ; ?> <? php bloginfo ( 'version');?> |
ñ) RSS comments: Displays the URL of the RSS of comments
1
| 'comments_rss2_url' ) ; ?> <? php bloginfo ( 'comments_rss2_url');?> |
o) Archives footer: calls some important Cosigo footer (Important for some plugins)
1
| ; ?> <? php wp_footer ();?> |
p) Call header: Call the header.php file
1
| ; ?> <? php get_header ();?> |
q) Call sidebar: Call sidebar.php file
1
| ; ?> <? php get_sidebar ();?> |
r) Call to footer: Call the footer.php file
1
| ; ?> <? php get_footer ();?> |
s) html type: Displays the type html used on your website, for example text / html
1
| 'html_type' ) ; ?> <? php bloginfo ( 'html_type');?> |
t) Charset: Shows the Charset of your website.
1
| 'charset' ) ; ?> <? php bloginfo ( 'charset');?> |
u) User: Displays the username you visit the blog (only if you logged)
1
| $user_identity ; ?> <? php echo $ user_identity;?> |
v) Tags allowed: Displays a list of html tags allowed in comments
1
| allowed_tags ( ) ; ?> <? allowed_tags php echo ();?> |
w) Calendar: Displays a calendar
1
| ; ?> <? php get_calendar ();?> |
x) Board of style: Displays an automatic route to the place where your style, for example http://www.tupagina/wp-content/themes/tutema/css/
1
| 'stylesheet_directory' ) ; ?> <? php bloginfo ( 'stylesheet_directory');?> |
y) Directory theme muestas a route to the address of your subject, for example, http://www.tupagina.com/wp-content/themes/tutema
1
| 'template_directory' ) ; ?> <? php bloginfo ( 'template_directory');?> |
a) Open Loop: code that opens the loop
1
| ( have_posts ( ) ) : ?> <? php if (have_posts ()):?> |
b) Closing the loop: code that closes the loop
1
| ; ?> <? php endif;?> |
c) post ID: Displays the number characteristic of the post (id)
1
| ; ?> <? php the_ID ();?> |
d) Permalink: Displays the URL for the entry
1
| ?> <? php the_permalink ()?> |
e) Title of entry: Displays the title of the post
1
| ; ?> <? php the_title ();?> |
f) Date of post: Displays the date of publication of the post
1
| 'F jS, Y' ) ?> <? php the_time ( 'F jS, Y')?> |
g) The author of the entry: Displays the author of the post
1
| ?> <? php the_author ()?> |
h) Content of the entry: Displays the contents of the entry
1
| 'Leer el resto de la entrada &raquo;' ) ; ?> <? php endwhile ( 'Read the rest of the entry »');?> |
i) Extract of entry: Public input extract
1
| 'Leer el resto de la entrada &raquo;' ) ; ?> <? php the_excerpt ( 'Read the rest of the entry »');?> |
j) Post tags: Sample entry labels
1
| 'Etiquetas: ' , ', ' , '<br />' ) ; ?> <? php the_tags ( 'Tags:', ',', '<br />');?> |
k) post categories: Shows the categories of post
1
| ', ' ) ?> <? php the_category ( ',')?> |
l) Link RELEASED: Shows a link (only seen by the administrator) to easily edit the entry
1
| 'Editar' , '' , ' . ' ) ; ?> <? php edit_post_link ( 'Edit','', '.');?> |
m) Comments: Shows post comments
1
| 'Sin comentarios &#187;' , '1 Comentario &#187;' , '% Comentarios &#187;' ) ; ?> <? php comments_popup_link ( 'No comment »', '1 Comment » ','% Comments » ');?> |
n) Open the entry: Code to open the entrance
1
| ( have_posts ( ) ) : the_post ( ) ; ?> <? php while (have_posts ()): the_post ();?> |
n) Close the entry: Code which closes the entrance
1
| ; ?> <? php endwhile;?> |
o) Check old: Shows a link to previous posts
1
| '&laquo; Entradas Antiguas' ) ?> <? php next_posts_link ( '« Entradas Antiguas')?> |
p) New Entries: Shows a link to the new entries
1
| 'Entradas nuevas &raquo;' ) ?> <? php previous_posts_link ( 'Check new »')?> |
q) comentarios.php File: Call the page comentarios.php (Required to display the comments of a post.
1
| ; ?> <? php comments_template ();?> |
r) Entry Previous: Shows a link to the entry previous posts
1
| '%' , '' , 'yes' , 'yes' ) ; ?> <? php previous_post ( '%','', 'yes', 'yes');?> |
s) Entry Next: Shows a link to the entry posteada after you see.
1
| '%' , '' , 'yes' , 'yes' ) ; ?> <? php next_post ( '%','', 'yes', 'yes');?> |

Michael is the creator and editor skyandstars.net which publishes guides and tutorials about WordPress, CuteNews, PHP, HTML and more. Acutalmente college student.
kpricornium
October 23, 2009
Excellent, thanks
maisa
November 26, 2009
very useful!
and I switch to wordpress (I qe anywhere else xD)
Mijael166
November 26, 2009
Heyy is cheating .... Tiens to keep the link xD Saludos linda
maisa
November 27, 2009
aca ajaj this
http://paramoredaily.com/
Michael
November 27, 2009
That: P then all to visit the website of maisa: p Saludos