Wordpress PHP Snippets for templates

This item was filled under [ Wordpress ]

Here are some very usefull informations for those who use Wordpress as CMS

PHP Snippets for templates – usefull functions

<?php the_content(); ?> Content of the posts
<?php if(have_posts()): ?> Checks if there are posts
<?php while(have_posts()) : the_post(); ?> Shows posts if posts are available
<?php endwhile; ?> Closes the ‘while’ PHP function
<?php endif; ?> Closes the ‘if’ PHP function
<?php get_header(); ?> Loads the header.php file
<?php get_sidebar(); ?> Loads the sidebar.php file
<?php get_footer(); ?> Loads the footer.php file
<?php the_time(‘m-d-Y’); ?> The date in ‘08-09-2009′ format
<?php comments_popup_link(); ?> Link for the comments on the post
<?php the_title(); ?> Title of a specific post or page
<?php the_permalink(); ?> URL of a specific post or page
<?php the_category(); ?> Category of a specific post or page
<?php the_author(); ?> Author of a specific post or page
<?php the_ID(); ?> ID of a specific post or page
<?php edit_post_link(); ?> Link to edit a specific post or page
<?php get_links_list(); ?> Links from the blogroll
<?php comments_template(); ?> comments.php file’s content
<?php wp_list_pages(); ?> List of pages of the site
<?php wp_list_cats(); ?> List of categories for the site
<?php next_post_link(‘%link’); ?> URL to the next post
<?php previous_post_link(‘%link’); ?> URL to the previous post
<?php get_calendar(); ?> The default calendar of the wordpress
<?php wp_get_archives(); ?> list of archives for the site
<?php posts_nav_link(); ?> Next and previous post link
<?php bloginfo(‘description’); ?> Site’s description
Popularity: 12 views
Tagged with: [ , , , ]
Update me when site is updated