Ganesh Veer

Ganesh Veer

Alandi Dewachi, Pune

WordPress Help Sheet

December 20, 2013, by admin, category Uncategorized, Wordpress

PHP Snippets For Header

The Title of the site    <?php  bloginfo(‘name’); ?>
The Title of specific page or post     <?php  wp_title(); ?>
The style.css files theme location      <?php bloginfo(‘stylesheet_url’); ?>
Pingback URL for the site     <?php bloginfo(‘pingback_url’); ?>
Location of the sites theme file       <?php bloginfo(‘template_url’); ?>
WordPress version for the site      <?php bloginfo(‘version’); ?>
Name of the site       <?php bloginfo(‘name’); ?>
HTML version of the site     <?php bloginfo(‘html_type’); ?>
Charset parameter of the site       <?php bloginfo(‘charset’); ?>

Basic Template files

search form   searchform.php
search content file     search.php
Error page file 404.php
Comments template fie  comments.php
single page file   page.php
stylesheet file  stylesheet.css
homepage   index.php
single post page    single.php
archive/category page   archive.php
header content file   header.php
footer content file   footer.php
sidebar content file  sidebar.php

Extra Stuff

Custom permalinks   /%postname%/
include any file   <?php include(TEMPLATEPATH.’/x’); ?>
value for search form <?php the_search_query(); ?>
Print out message  <?php _e(‘Message’); ?>
Display the register link  <?php wp_register(); ?>
Display login/logout link  <?php wp_loginout(); ?>
Divides the content into page  <!– Next Page –>
Cut off the content  <!– more –>
Meta for administrators  <?php wp_meta(); ?>
Time to load the page  <?php timer_stop(1); ?>
Queries to load the page  <?php echo get_num_queries(); ?>

PHP Snippets for the template

Content of the posts  <?php the_content(); ?>
checks if there are posts   <?php if(have_posts()); ?>
Shows posts if posts are available   <?php while(have_posts()): the_post(); ?>
close the while php function      <?php endwhile; ?>
close the if php function    <?php endif; ?>
header.php file content     <?php get_header(); ?>
footer.php file content   <?php get_footer(); ?>
sidebar.php file content   <?php get_sidebar(); ?>
Title of the specific page/post    <?php the_title(); ?>
URL of specific page/post <?php the_permalink(); ?>
Category of specific page/post <?php the_category(‘,’); ?>
Author of the specific page/post  <?php the_author(); ?>
ID of specific page or post <?php the_ID(); ?>
link to edit specific page/post <?php edit_post_link(); ?>
link from the blogroll  <?php get_links_list(); ?>
comment.php file content    <?php comments_template(); ?>
List of the pages of site  <?php wp_list_pages(); ?>
List of the categories of the site  <?php wp_list_cats(); ?>
URL to the next post   <?php next_post_link(‘%link’); ?>
URL to the previous post  <?php previous_post_link(‘%link’); ?>
The built in calender  <?php get_calendar(); ?>
list of the archives of the site   <?php wp_get_archives(); ?>
Next&Prev post links <?php posts_nav_link(); ?>
Sites Description <?php bloginfo(‘description’); ?>
Link for the comments of the post   <?php comments_popup_link(); ?>

Comments are closed.