Template Functions

Function Description
<?php the_content(); ?> content of posts/pages
<?php if(have_posts()): ?> check if there are posts
<?php while(have_posts()): the_post(); ?> shows posts
<?php endwhile; ?> closes loop
<?php endif; ?> closes if
<?php get_header(); ?> header.php file contents
<?php get_sidebar(); ?> sidebar.php file contents
<?php get_footer(); ?> footer.php file contents
<?php the_time('m-d-y'); ?> the date is ’08-18-07′
<?php comments_popup_link(); ?> link to comments of post
<?php the_title(); ?> title of post/page
<?php the_permalink(); ?> url of post/page
<?php the_category(); ?> category of post/page
<?php the_author(); ?> author of post/page
<?php the_ID(); ?> id of post/page
<?php edit_post_link(); ?> edit link of post/page
<?php wp_list_bookmarks(); ?> links from blogroll
<?php comments_template(); ?> comment.php file contents
<?php wp_list_pages(); ?> list all pages
<?php wp_list_categories(); ?> list all categories
<?php next_post_link('%link'); ?> url to next post
<?php previous_post_list('%link'); ?> url to previous post
<?php get_calendar(); ?> show post calendar
<?php wp_get_archives(); ?> list of archive urls
<?php posts_nav_link(); ?> next and previous post link
<?php rewind_posts(); ?> rewinds post for a second loop
Function Description  
<?php the_content(); ?> content of posts/pages  
<?php if(have_posts()): ?> check if there are posts  
<?php while(have_posts()): the_post(); ?> shows posts  
<?php endwhile; ?> closes loop  
<?php endif; ?> closes if  
<?php get_header(); ?> header.php file contents  
<?php get_sidebar(); ?> sidebar.php file contents  
<?php get_footer(); ?> footer.php file contents  
<?php the_time('m-d-y'); ?> the date is ’08-18-07′  
<?php comments_popup_link(); ?> link to comments of post  
<?php the_title(); ?> title of post/page  
<?php the_permalink(); ?> url of post/page  
<?php the_category(); ?> category of post/page  
<?php the_author(); ?> author of post/page  
<?php the_ID(); ?> id of post/page  
<?php edit_post_link(); ?> edit link of post/page  
<?php wp_list_bookmarks(); ?> links from blogroll  
<?php comments_template(); ?> comment.php file contents  
<?php wp_list_pages(); ?> list all pages  
<?php wp_list_categories(); ?> list all categories  
<?php next_post_link('%link'); ?> url to next post  
<?php previous_post_list('%link'); ?> url to previous post  
<?php get_calendar(); ?> show post calendar  
<?php wp_get_archives(); ?> list of archive urls  
<?php posts_nav_link(); ?> next and previous post link  
<?php rewind_posts(); ?> rewinds post for a second loop

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *