Most Useful Simple WordPress Snippets

Fundamental 85 views
+1
0 Flares 0 Flares ×

Author

<?php the_author(); ?>

Author Description

<?php the_author_description(); ?>

Author Login

<?php the_author_login(); ?>

Author First Name

<?php the_author_firstname(); ?>

Author Last Name

<?php the_author_lastname(); ?>

Author Nickname

<?php the_author_nickname(); ?>

Author ID

<?php the_author_ID(); ?>

Author Link

<?php the_author_url(); ?>

Author AIM Screenname

<?php the_author_aim(); ?>

Author Yahoo IM ID

<?php the_author_yim(); ?>

Author Posts

<?php the_author_posts(); ?>

Author Posts Link

<?php the_author_posts_link(); ?>

Author List

<?php wp_list_authors(); ?>

Post Category

<?php the_category(); ?>

The Category RSS

<?php the_category_rss(); ?>

Page Category Title

<?php single_cat_title(); ?>

Category Description

<?php category_description(); ?>

Category Dropdown

<?php wp_dropdown_categories(); ?>

Category Link List

<?php wp_list_categories(); ?>

Category Parents

<?php get_category_parents(); ?>

Category Array

<?php get_the_category(); ?>

Comment Count

<?php comments_number('0 Comments', '1 Comment', '% Comments'); ?>

Link to Post Comments

<?php comments_link(); ?>

Link to RSS Feed of Post Comments

<?php comments_rss_link(); ?>

Link to Pop-up Window

<?php comments_popup_script(); ?>

Comment ID

<?php comment_ID(); ?>

Comment Author

<?php comment_author(); ?>

Comment Author IP Address

<?php comment_author_IP(); ?>

Comment Author Email

<?php comment_author_email(); ?>

Comment Author Email Link

<?php comment_author_email_link(); ?>

Type of Comment

<?php comment_type(); ?>

Comment Text

<?php comment_text(); ?>

Comment Excerpt

<?php comment_excerpt(); ?>

Comment Date

<?php comment_date('F jS, Y'); ?>

Comment Time

<?php comment_time('g:i a'); ?>

Post Date

<?php the_date('F jS, Y'); ?>

Post Time

<?php the_time('g:i a'); ?>

Post Modification Date

<?php the_modified_date('F jS, Y'); ?>

Post Modification Time

<?php the_modified_time('g:i a'); ?>

Post Calendar

<?php get_calendar(); ?>

Blog Name

<?php bloginfo('name'); ?>

Blog Description

<?php bloginfo('description'); ?>

Blog URL

<?php bloginfo('url'); ?>

Blog RSS URL

<?php bloginfo('rss2_url'); ?>

Blog Atom URL

<?php bloginfo('atom_url'); ?>

Comments RSS URL

<?php bloginfo('comments_rss2_url'); ?>

Blog Pingback URL

<?php bloginfo('pingback_url'); ?>

Blog Admin Email

<?php bloginfo('admin_email'); ?>

Blog Charset

<?php bloginfo('charset'); ?>

Blog WordPress Version

<?php bloginfo('version'); ?>

Blog Template URL

<?php bloginfo('template_url'); ?>

Blog Template Directory

<?php bloginfo('template_directory'); ?>

Blog Stylesheet URL

<?php bloginfo('stylesheet_url'); ?>

Page Title

<?php wp_title(); ?>

Get Posts

<?php get_posts(''); ?>

Archives List

<?php wp_get_archives(); ?>

Page List

<?php wp_list_pages(); ?>

Page Dropdown List

<?php wp_dropdown_pages(); ?>

Login/Logout

<?php wp_loginout(); ?>

Register Link

<?php wp_register(); ?>

Query Posts

<?php query_posts(''); ?>

Tag Cloud

<?php wp_tag_cloud('smallest=8&largest=22'); ?>

Search Query

<?php the_search_query(); ?>

Edit Post Link

<?php edit_post_link('Edit', 'before', 'after'); ?>

Edit Comment Link

<?php edit_comment_link('Edit', 'before', 'after'); ?>

Page Link

<?php wp_page_links(); ?>

Yearly Archive URL

<?php get_year_link('2008'); ?>

Monthly Archive URL

<?php get_month_link('year','month'); ?>

Daily Archive URL

<?php get_day_link('year','month','day'); ?>

Permalink Anchor

<?php permalink_anchor(); ?>

Permalink (PHP)

<?php get_permalink(id); ?>

Permalink URL

<?php the_permalink(); ?>

Permalink (For RSS)

<?php permalink_single_rss('index.php'); ?>

Post ID

<?php the_ID(); ?>

Post Title

<?php the_title(); ?>

Post Title (Attribute)

<?php the_title_attribute(); ?>

Single Post Title

<?php single_post_title('prefix', TRUE); ?>

Post Title (RSS)

<?php the_title_rss(); ?>

Post Content

<?php the_content('Read more...'); ?>

Post Content (RSS)

<?php the_content_rss('Read more...', TRUE, 'more_file'),cut, encode_html; ?>

Post Excerpt

<?php the_excerpt(); ?>

Post Excerpt (RSS)

<?php the_excerpt_rss(); ?>

Previous Post Link

<?php previous_post_link(); ?>

Next Post Link

<?php next_post_link(); ?>

Post Nav Links

<?php posts_nav_link(); ?>

Post Meta

<?php the_meta(); ?>

Post Tags

<?php the_tags(); ?>

Post Count

<?php wp_count_posts(); ?>

Tag Array

<?php get_the_tags(); ?>

Tag List

<?php get_the_tag_list(); ?>

Tag Title (Current Page)

<?php single_tag_title(); ?>

Category Loop

<?php query_posts('cat=##'); ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>							
	<?php the_post_thumbnail(); ?>
	<?php the_title(); ?>
	<?php the_content(); ?>
					
<?php endwhile; ?>
<?php wp_reset_query(); ?>

For Reference

WordPress Codex
WordPress Coda Clips Collection

Posted in Wordpress

Discuss:

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

No Trackbacks.

Login

Register | Lost your password?
0 Flares Twitter 0 Facebook 0 Google+ 0 0 Flares ×