Upload
seo-shankar
View
517
Download
2
Embed Size (px)
DESCRIPTION
WPCandy offers this excellent cheatsheet that covers the most common questions involved in technical aspects to WP. This includes snippets for the header and template, basic template files and a number of items with ways to use them to the best of their abilities. This file comes in a PDF and is provided in plenty of languages
Citation preview
header.php
footer.php
index.php
sidebar.php
WordPress Help Sheet.
<?php bloginfo('name'); ?><?php wp_title(); ?><?php bloginfo('stylesheet_url'); ?><?php bloginfo('pingback_url'); ?><?php bloginfo('template_url'); ?><?php bloginfo('version'); ?><?php bloginfo('atom_url'); ?><?php bloginfo('rss2_url'); ?><?php bloginfo('url'); ?><?php bloginfo('name'); ?><?php bloginfo('html_type'); ?><?php bloginfo('charset'); ?>
WordPress Help Sheet.WordPress Help Sheet.liquidicityliquidicity
style.cssindex.phpsingle.phparchive.phpsearchform.phpsearch.php404.phpcomments.phpfooter.phpheader.phpsidebar.phppage.php
Basic Template Files
Style sheet �le
Lists
PHP Snippets for Header
© 2007 Go Squared Ltd. & WPCandy
Home page �leSingle post page �leArchive/category �leSearch form �leSearch content �leError page �leComments template �leFooter content �leHeader content �leSidebar content �leSingle page �le
Title of the siteTitle of the speci�c post or pageThe style.css �le's locationPingback URL for the siteLocation for the site’s theme �lesWordPress version for the siteAtom URL for the siteRSS2 URL for the siteExact URL for the siteName of the site HTML version of the siteCharset parameter of the site
<?php the_content(); ?><?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?><?php endwhile; ?><?php endif; ?><?php get_header(); ?><?php get_sidebar(); ?><?php get_footer(); ?><?php the_time('m-d-y') ?><?php comments_popup_link(); ?><?php the_title(); ?><?php the_permalink() ?><?php the_category(', ') ?><?php the_author(); ?><?php the_ID(); ?><?php edit_post_link(); ?><?php get_links_list(); ?><?php comments_template(); ?><?php wp_list_pages(); ?><?php wp_list_cats(); ?><?php next_post_link(' %link ') ?> <?php previous_post_link('%link') ?><?php get_calendar(); ?><?php wp_get_archives() ?><?php posts_nav_link(); ?><?php bloginfo(’description’); ?>
PHP Snippets for Templates
Content of the postsChecks if there are postsShows posts if posts are availableCloses the 'while' PHP functionCloses the 'if' PHP functionHeader.php �le's contentSidebar.php �le's contentFooter.php �le's contentThe date in '08-18-07' formatLink for the comments on the postTitle of a speci�c post or pageUrl of a speci�c post or pageCategory of a speci�c post or pageAuthor of a speci�c post or pageID of a speci�c post or pageLink to edit a speci�c post or pageLinks from the blogrollComment.php �le’s contentList of pages of the List of categories for the siteUrl to the next postUrl to the previous postThe built-in calendarList of archives for the siteNext and previous post linkSite’s description
Extra Stu�
/%postname%/
Custom permalinks
<?php include(TEMPLATEPATH . ‘/x’); ?>
Include any file
<?php the_search_query(); ?>
Value for search form
<?php _e(’Message’); ?>
Prints out message
<?php wp_register(); ?>
Displays the register link
<?php wp_loginout(); ?>
Displays the login/logout link
<!--next page-->
Divides the content into pages
<!--more-->
Cuts off the content and adds a link to the rest of the content
<?php wp_meta(); ?>
Meta for administrators
<?php timer_stop(1); ?>
Time to load the page
<?php echo get_num_queries(); ?>
Queries to load the page
2
1
1 Replace x with file name 2 Only for registered useres