Click me

The Ultimate WordPress Cheatsheet

WORDPRESS THEME ANATOMY header.php LOOP index.php archive.php page.php single.php comments.php search.php footer.php ТЕMPLATE CНЕСKLIST header.php Displays document header and navigation menus sidebar.php Display widgets footer.php Display footer just before closing the body tag index.php Display list of posts in excerpt or full-length form archive.php Display archives: tag, category, date-based or author based page.php Display page title and content, comments and metadata single.php Display post title and content, categories and post tags comments.php Display avatars, threaded comments, trackbacks/pingbacks search.php Display list of posts in excerpt or full-length form INCLUDE TAGS get_header() Includes the Header template (header.php) get _footer() Includes the Footer template (footer.php) get_sidebar() Includes the Sidebar template (sidebar.php) php get_template_part() Includes the Custom template files (slug.php) php get_search_form() Includes the Search Form template (searchform.php) php comments_template() Includes the Comments template (comments,.php) get_header(), get_footer(), get_sidebar() accepts parameter $name (string) get template_part() accepts 2 parameters $slug(string), $name (string) TEMPLATE TAGS GENERAL TAGS AUTHOR TAGS general-template.php author-template.php get header the_author get the_author the_author_link get_footer get_sidebar get template_part get the_author_link get_search_form the_author_meta wp_loginout wp_logout_url wp_login_url wp_login_form wp_lostpassword_url the_author_posts the_author_posts_link wp_dropdown_users wp_list_authors get_author_posts_url wp_register POST THUMBNAIL TAGS wp_meta bloginfo post-thumbnail-template.php get_bloginfo has_post_thumbnail get_post_thumbnail_id the_post_thumbnail get current_blog_id wp_title single_post_title get the_post_thumbnail post_type_archive_title single_cat_title CATEGORY TAGS single_tag_title category-template.php category_description single_cat_title single_term_title single_month_title get_archives_link the_category the_category_rss wp_get_archives calendar_week_mod wp_dropdown_categories get_calendar wp_list_categories delete get_calendar_cache single_tag_title allowed_tags tag_description edit_bookmark_link the_tags edit_comment_link wp_generate_tag_cloud wp_tag_cloud term_description edit_post_link edit_tag_link single_term_title get admin_url get home_url get_the_term_list get_search_link single_term_title get search_query the_terms the_taxonomies get site_url home_url the_feed_link NAVIGATION MENU TAGS wp_ajaxurl nav-menu-template.php wp_nav_menu walk_nav_menu_tree COMMENT TAGS POST TAGS post-template.php body_class next_image_link comment-template.php cancel_comment_reply_link comment_author comment_author_email next_post_link comment_author_email_link next_posts_link comment_author_IP post_class comment_author_link post_password_required comment_author_rss posts_nav_link comment_author_url previous_image_link comment_author_url_link previous_post_link previous_posts_link single_post_title comment_class comment_date comment_excerpt sticky_class comment_form_title the_category comment form the_category_rss comment_ID the_content comment id fields the_content_rss comment_reply_link the_excerpt comment_text the_excerpt_rss comment_text_rss the_ID comment_time the_meta comment_type the_shortlink comments_link the_tags comments_number the_title comments_popup_link the_title_attribute comments_popup_script the_title_rss comments_rss_link wp_link_pages get_avatar get_attachment_link next_comments_link wp_get_attachment_link paginate_comments_links the_attachment_link permalink_comments_rss the_search_query previous_comments_link is_attachment wp_list_comments wp_attachment_is_image wp_get_attachment_image wp_get_attachment_image_src LINK TAGS wp_get_attachment_metadata get the_date single_month_title link-template.php the_permalink user_trailingslashit the_date permalink_anchor the_date_xml get_permalink the_modified_author get_post_permalink the_modified_date post_permalink the_modified_time get_page_link the_time get_attachment_link the_shortlink get_bookmark wp_get_shortlink get_bookmark_field wp_shortlink_header get_bookmarks wp_shortlink_wp_head get_bloginfo( ) PARAMETERS The get_bloginfo() function returns information about your site which can then be used elsewhere in your PHP code. This function, as well as bloginfo(), can also be used to display your site information. USAGE PARAMETERS $show - (string)(Optional) - default: name 'name' Returns the 'Site Title' from the 'blogname' record. 'description' Returns the 'Tagline' from the 'blogdescription' record. 'wpurl'/'siteurl" Returns the 'WordPress address (URI)' from the 'siteurl' record. 'url' /'home' Returns the 'Site address (URI)'. 'admin_email' Returns the 'E-mail address' from the 'admin_email' record. 'charset' Returns the 'Encoding for pages and feeds! 'version' Returns the WordPress Version you use. 'html_type' Returns the Content-Type of WordPress HTML pages. 'text_direction' Returns the Text Direction of WordPress HTML pages. 'language' Returns the language of WordPress. 'stylesheet_url' Returns the primary CSS file URL of the active theme. 'stylesheet_directory' Returns the stylesheet directory URL of the active theme. 'template_url' URL of the active theme's directory. 'template_directory' Same as above. 'pingback_url" Returns the Pingback XML-RPC file URL (xmlrpc.php). 'atom_url' Returns the Atom feed URL (/feed/atom). 'rdf_url" Returns the RDF/RSS 1.0 feed URL (/feed/rfd). 'rss_url' Returns the RSS 0.92 feed URL (/feed/rss). 'rss2_url" Returns the RSS 2.0 feed URL (/feed). 'comments_atom_url' Returns the comments Atom feed URL (/comments/feed). 'comments_rss2_url' Returns the comments RSS 2.0 feed URL (/comments/feed). $filter - (string)(Optional) - default: raw $post, $term, $comment VALUES Wordpress objects store attributes that can be called by values USAGE $object -> property VALUES $post - global, can be accessed outside The Loop ID Unique post ID. post_author User ID of the author. post_date In the format: yyyy-mm-dd hh:mm:ss post_date_gmt Same as above, but in GMT timezone. post_content Similar to HTML view in editor. No paragraphs/linebreaks. post_title Human-readable post title. post_excerpt Content of the excerpt, if one has been explicitly set. post_status published/pending/draft. comment_status open/closed. ping_status open/closed. post_password Plain-text version of the posts' password. post_name The post's slug. to_ping Addresses in the "Send Trackbacks to:" box before publishing. pinged Addresses in the "Send Trackbacks to:" box that have pinged. post_modified Server time the post was last modified. post_modified_gmt GMT time the post was last modified. post_content_filtered Cache expensive post content transformations. post_parent ID of the page's parent. guid Unique link to the post menu_order Value set in the "Menu Order" box on Pages. post_type post/page/attachment/revision/nav_menu_item/custom post_mime_type MIME type of attachments. comment_count Number of comments. ancestors Array of parent/grandparent pages. filter How the post content has been filtered before being returned $term - get_the_tags() and get_the_category() functions term_id The category or tag ID. name The human-readable name. slug Permalink slug for the term. term_group If one term is an alias for another, the group is shared. term_taxonomy_id ID of the taxonomy's entry in the wp_term_taxonomy table. taxonomy category/post_tag description Text entered to describe this tag/category. parent ID of this term's parent term. 0 if it has none. count Number of posts using this tag/category. object_id ID of the object that the category/tag is attached to. $comment - specific information about comments comment_ID Unique ID of this comment. comment_post_ID ID of the post this comment was made on. comment_author Name of the commenter. comment_author_email Commenter's email address. comment_author_url Commenter's website address comment_author IP IP address of the commenter. comment_date (Server) Time of comment in yyyy-mm-dd hh:mm:ss comment_date_gmt GMT time that the comment was left. comment_content Unfiltered version of the comment's text. comment_karma Unused, and may be removed in future. comment_approved 1 or 0, based on whether or not the comment is approved. comment_agent Long string of the commenter's user-agent. comment_type Blank for regular comments. comment_parent The ID of the comment this was in reply to (O if none). user_id User ID of a logged-in user. Techking DEHAHS POWERED BY TESTKING sources: | |

The Ultimate WordPress Cheatsheet

shared by rmmojado on Mar 26
Tech king has put together a nice infographic that you can use if you work with WordPress themes. It covers the anatomy of WordPress theme, a template checklist, include tags, template tags and other ...


Tech King


Unknown. Add a source


Did you work on this visual? Claim credit!

Get a Quote

Embed Code

For hosted site:

Click the code to copy


Click the code to copy
Customize size