WPLift is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission.
8 Mamba-Mentality WordPress Cheat Sheets for Devs & Designers
Here’s your ultimate collection of WordPress cheat sheets for 2024, designed to save you time when building your next project.
Whether you’re a designer or developer, these 8 cheat sheets ensure that you’ll never again have to break out the Google-Fu when some small yet utterly vital piece of information escapes your mind.
Below, you’ll find guides, definitions, and code snippets to help you:
- Create custom WordPress themes from scratch
- Customize post displays on your website
- Work more efficiently in Gutenberg and Elementor
And more.
Ready to start working smarter, not harder? Dig in and help yourself to our in-depth WordPress reference library.
Why Use WordPress Cheat Sheets?
Cheat Sheets can be particularly invaluable for beginners who are taking the first steps into the vast world of the WordPress CMS (Content Management System) platform.
Would-be WordPress web developers, for example, are likely to find many new terms and techniques. While most of the platform is relatively straightforward, it’s hard to deny that many of these terms can be difficult for newcomers to remember.
Meanwhile, fledgling WordPress designers will come across a cornucopia of new visual elements, layout structures, and styling options when creating and expanding their themes.
Whatever you’re using WordPress for, cheat sheets can save you a lot of time researching unfamiliar terms or figuring out a new process, ultimately serving as an invaluable and easily accessible reference tool.
Still, that doesn’t mean that they’re only useful for beginners.
More experienced WordPress users tasked with completing projects to a deadline will also find that cheat sheets provide a valuable library of code snippets and other assets that can be used to improve efficiency in their projects.
8 Powerhouse WordPress Cheat Sheets for Designers and Developers
1. WordPress Theme Templates
Themes are the foundation of WordPress design, providing layouts, visual elements, and functional components that can be customized to create unique websites.
Existing themes can be managed via the dashboard and edited using page builder tools such as Elementor and Divi. However, you may prefer to build your own theme from scratch.
In that case, you’ll need to know about templates, which are the fundamental building blocks of themes, containing the code necessary for them to work.
Below, you’ll find a list of all these required templates and what they do:
Essential Files
Template | Purpose |
index.php | Main default page file |
style.css | Theme stylesheet responsible for defining the visual appearance of your site. |
Site Structure Files
Template | Purpose |
header.php | Contains elements that appear in the header at the top of every page. |
footer.php | Contains elements that appear in the footer at the bottom of every page. |
sidebar.php | Contains elements that appear in the sidebar at the side of every page. |
single.php | Template for displaying individual posts. |
page.php | Template for displaying individual pages. |
comments.php | Template for displaying comments on posts and pages. |
404.php | Template for displaying a custom error message when a page is not found. |
Function Files
Template | Purpose |
functions.php | Contains code that controls the theme’s functions and interactive elements. |
archive.php | Contains code for displaying archives |
searchform.php | Defines the appearance of the search form. |
search.php | Contains code for displaying search results. |
2. WordPress Theme – Defining Details
Along with styling details, the style.css template also includes the theme definition, which is essentially a kind of metadata about the theme itself.
This information is displayed on the theme’s page when you look at it via the Appearance – Themes options.
For example, you can see that the theme details for the Twenty Twenty-Three theme shown in the stylesheet above are reflected on that theme’s page within our test site.
Below is a breakdown of each element of your WordPress theme definition.
Element | User Input | Description |
Theme Name | String | The name of the theme |
Theme URI | URL | Link to the theme’s website or documentation |
Author | String | The name of the theme’s author |
Author URI | URL | Link to the author’s website |
Description | Text | Overview of the theme, its audience, features, etc. |
Requires at least | Version number | Minimum version of WordPress needed to run this theme |
Tested up to | Version number | Highest version of WordPress the theme was tested with |
Requires PHP | Version number | Minimum version of PHP needed to run this theme |
Version | Version number | Current version of the theme |
License | String | License under which the theme is distributed (e.g., GPLv2) |
License URI | URL | Link to the license information |
Text Domain | String | Unique identifier for theme translations |
Tags | Array of strings | Keywords describing the theme’s key features |
We’ve also provided some handy sample code that you can use when creating your own WordPress themes. Simply replace the definition with the relevant, specific information about your team.
/*
Theme Name: Your Theme Name
Theme URI: https://yourwebsite.com/theme
Author: Your Name
Author URI: https://yourwebsite.com
Description: A brief description of your theme.
Version: Replace with your theme’s version (Version 1, etc)
Requires at least: Minimum WordPress version (6.1) etc.
Tested up to: Highest tested WordPress version (6.6 etc)
Requires PHP: Replace with minimum PHP version (7.4 etc)
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Text Domain: your-theme
Tags: Tags describing your theme
*/
3. Template Tags
Not to be used with taxonomy tags used to categorize your content, template tags are functions that make it possible to display the individual elements of your site within your theme.
Written in the PHP language, these tags come in three distinct types:
Include Tags – Used to call and utilize the code within other templates.
For example, adding the following tag in your index.php file tells WordPress to include the content of the sidebar.php file at that specific point in your index.php template.
<?php get_sidebar(); ?>
Header (Bloginfo) Tags – Provide information about the WordPress site and its pages.
For example, the <?php wp_title(); ?> is used to display the title of a specific page in browsers, while the <?php bloginfo(‘name’); ?> provides the title of the whole site.
General Template Tags – Used in any template file to display specific types of information within your site.
For example, the <?php the_excerpt(); ?> tag can be used to display a post excerpt in a blog archive or on the homepage.
The cheat sheet below provides WordPress designers with a detailed list of all these tags and their uses.
Include Tags
Tag | Purpose |
<?php get_header(); ?> | Includes the content of the header.php file |
<?php get_sidebar(); ?> | Includes the content of the sidebar.php file |
<?php get_footer(); ?> | Includes the content of the footer.php file |
<?php comments_template(); ?> | Includes the comments template (comments.php) |
Header Tags
Tag | Purpose |
<?php bloginfo(‘name’); ?> | Display site title |
<?php bloginfo(‘url’); ?> | Display site URL |
<?php bloginfo(‘stylesheet_url’); ?> | URL of stylesheet file |
<?php get_stylesheet_directory(); ?> | Location of stylesheet folder |
<?php bloginfo(‘template_url’); ?> | URL of theme directory |
<?php bloginfo(‘description’); ?> | Display site tagline |
<?php bloginfo(‘atom_url’); ?> | Display Atom feed URL |
<?php bloginfo(‘rss2_url’); ?> | Display RSS 2.0 feed URL |
<?php bloginfo(‘pingback_url’); ?> | Display Pingback URL |
<?php bloginfo(‘version’); ?> | WordPress version |
<?php bloginfo(‘html_type’); ?> | HTML version |
<?php site_url(); ?> | Site root URL |
<?php wp_title(); ?> | Display page title |
General Tags
Tag | Purpose |
<?php the_content(); ?> | Display post content |
<?php the_excerpt(); ?> | Display post excerpt |
<?php the_title(); ?> | Display post title |
<?php the_permalink(); ?> | Display post permalink |
<?php the_category(‘, ‘); ?> | Display post categories |
<?php the_author(); ?> | Display post author |
<?php the_ID(); ?> | Display post ID number |
<?php edit_post_link(); ?> | Display edit link for the post |
<?php next_post_link(‘%link’); ?> | Display link to the next post |
<?php previous_post_link(‘%link’); ?> | Display link to the previous post |
<?php get_links_list(); ?> | Display list of links from the blogroll |
<?php wp_list_pages(); ?> | Display list of pages |
<?php wp_get_archives(); ?> | Display archive list |
<?php wp_list_cats(); ?> | Display category list |
<?php get_calendar(); ?> | Display a calendar |
<?php wp_register(); ?> | Display registration link (for member sites) |
<?php wp_loginout(); ?> | Display login and logout links link (for member sites) |
4. Navigation Tags
Navigation is an essential component of user experience, enabling your visitors to move between pages and find what they’re looking for.
Below is a breakdown of common navigation tags you can use as a WordPress web developer.
Here is a custom code snippet that you can for building a navigation menu into your WordPress theme:
Here, theme location refers to the location of the menu code you registered in the functions.php, while container class relates to a CSS class used to style the container elements that wrap your menus.
5. The WordPress Loop
In WordPress, The Loop is a snippet of PHP code that is used to display your posts.
It’s called the loop because it retrieves content from your database and loops through each individual post, formatting it according to your theme’s layout and style settings.
In its basic format, The Loop looks like this:
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
//
// Post Content here
//
endwhile; // end while
endif; // end if
?>
Here’s a breakdown of this code structure:
Code | Description |
if ( have_posts() ) : | Check if there are any posts to display. |
while ( have_posts() ) : the_post(); | Begins the loop and fetches the next post. |
/* content here */ | This is where you place template tags to display post information. |
endwhile; else : | Ends the loop and provides alternative content if no posts are found. |
endif; | Closes the conditional statement. |
You can also use specific tags to customize:
- Which posts are displayed
- How many posts are displayed
- Which parts of a post are displayed (title, excerpt, etc.).
And more.
The following code snippet gives you an example of how you could use this in your WordPress development:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<p><?php the_excerpt(); ?></p>
<?php endwhile; else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
Here’s a list of some of the more common tags you can use to customize the way The Loop displays your content.
Template Tag | Description |
the_title() | Display post title |
the_content() | Display post content |
the_excerpt() | Display post excerpt |
the_permalink() | Display post permalink |
the_author() | Display post author |
the_date() | Display post date |
the_category() | Display post categories |
the_tags() | Display post tags |
8. Extra WordPress Tags You’ll Find Helpful
Before we move on from tags altogether, here’s an extensive list of other tags you may want to use when developing WordPress sites.
Function | Description |
get_template_part() | Include template part from your theme |
locate_template() | Locate a template file |
get_search_form() | Display search form |
dynamic_sidebar() | Display sidebar widget area |
get_header_image() | Get header image URL |
has_post_thumbnail() | Check for featured image for a post |
the_post_thumbnail() | Display featured image |
get_post_meta() | Retrieve post metadata |
update_post_meta() | Update post metadata |
get_option() | Retrieve option from WordPress options table |
update_option() | Update option in WordPress options table |
get_the_date() | Display date the post was written |
the_modified_time() | Display last time a post was modified |
wp_get_archives() | Display monthly archives |
wp_list_categories() | Display list of categories |
get_avatar( ’email@example.com’, XX ) | Display Gravatar of a user from a specified email address* |
get_avatar( get_the_author_meta( ‘ID’ ), XX ) | Display Gravatar of the current post’s author* |
* replace XX with a number to define the number of pixels for the displayed avatar. For example, get_avatar( get_the_author_meta( ‘ID’ ), 32 ) would display the avatar at 32 pixels.
7. Gutenberg Keyboard Shortcuts
Along with the standard keyboard shortcuts for tasks such as copy and paste, the Gutenberg editor for WordPress also has its own set of keyboard shortcuts.
Below is a complete list of the shortcuts you can use to save time when working in Gutenberg.
Function | Windows Shortcut | Mac Shortcut |
Open Search | Ctrl + K | Cmd + K |
Add a new block | Enter | Enter |
Duplicate selected block(s) | Ctrl + Shift + D | Cmd + Shift + D |
Remove selected block(s) | Alt + Shift + Z | Control + Option + Z |
Insert new block before selection | Ctrl + Alt + T | Cmd + Option + T |
Insert new block after selection | Ctrl + Alt + Y | Cmd + Option + Y |
Change block type | / | / |
Clear selection | Esc | Esc |
Redo | Ctrl + Shift + Z | Cmd + Shift + Z |
Show/hide settings bar | Ctrl + Shift + , | Cmd + Shift + , |
Open block navigation menu | Alt + Shift + O | Option + Control + O |
Navigate to next part of editor | Alt + Shift + N | Option + Control + N |
Navigate to previous part of editor | Alt + Shift + P | Option + Control + P |
Navigate to nearest toolbar | Alt + F10 | fn + Option + F10 |
Switch between Visual and Code Editor | Ctrl + Shift + Alt + M | Cmd + Option + Shift + M |
8. Elementor Hotkeys
The Elementor page builder also has its own array of keyboard shortcuts known as hotkeys.
We’ve provided a list of some of the more common ones below. You can also access the list of Elementor shortcuts by pressing ctrl / cmd + ? from within the Elementor page editor.
Function | Windows Shortcut | Mac Shortcut |
Responsiveness Mode | Ctrl + Shift + M | Cmd + Shift + M |
Template Library | Ctrl + Shift + L | Cmd + Shift + L |
Notes | Shift + C | Shift + C |
Keyboard Shortcuts | Ctrl + ? | Cmd + ? |
Quit | Esc | Esc |
Finder | Ctrl + E | Cmd + E |
Show/Hide Panel | Ctrl + P | Cmd + P |
Site Settings | Ctrl + K | Cmd + K |
Structure | Ctrl + I | Cmd + I |
Page Settings | Ctrl + Shift + Y | Cmd + Shift + Y |
History | Ctrl + Shift + H | Cmd + Shift + H |
User Preferences | Ctrl + Shift + U | Cmd + Shift + U |
WordPress Technical Tips, Tutorials, and Troubleshooting Guides
Before we wrap this up, here’s a list of other useful WordPress resources we’ve produced here at WPLift.
Consider this your personal reference library, an easily accessible collection of tutorials, troubleshooting advice, and technical tips to help you work more efficiently and build amazing WordPress projects:
Beginner’s Guides
- WooCommerce Tutorial – How to build an eCommerce site on WordPress.
- How to Start a WordPress blog – A step-by-step guide for newcomers.
- How to Install WordPress Locally – A step-by-step tutorial for installing a local version of WordPress on your computer.
Advanced Tutorials
- How to Optimize Cumulative Layout Shift (CLS) on WordPress – A guide to improving your website against this essential Core Web Vital metric.
- How to Create a WordPress Plugin -20 tutorials to help you create your own plugins
- How to Add Hreflang Tags in Your WordPress Site – A guide to using these important HTML tags to display your website in different languages
WordPress Development Tools
- Free WordPress Theme Development Tool Kit – A collection of useful free resources from around the web to help you build your themes.
- Free WordPress Developer Tools – 12 free tools to streamline your WordPress web development process.
Troubleshooting
- Common WordPress Errors and How to Fix Them – Solutions to over 40 problems most frequently faced by WordPress users.
- Troubleshooting 404 Errors in WordPress – A complete guide to resolving errors that occur when a resource is missing.
- How To Troubleshoot Common WordPress Migration Issues – Step-by-step instructions for identifying and solving problems when moving your site from one server to another.
- Troubleshooting Incorrect Permalinks in WordPress – Misconfigured permalinks are a common cause of 404 errors. This guide shows you how to fix them.
- Proven Methods to Resolve WordPress White Screen of Death – Why your website is showing a blank screen and what to do about it.
Using These 8 Powerhouse WordPress Cheat Sheets for Devs & Designers: A Final Word of Advice
Whether you’re a WordPress designer or developer, the eight cheat sheets featured above serve as a useful resource that you can refer to when building, customizing, or optimizing your WordPress projects.
Be sure to bookmark this page so that you always have the information you need at your fingertips, and subscribe to the WPLift newsletter (above the footer) for more WordPress news, tutorials, and resources delivered right to your inbox every week.