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

Last Updated on August 12th, 2024

Tags:

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. 

wp-cheatsheets-tempalts

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 

TemplatePurpose
index.phpMain default page file
style.cssTheme stylesheet responsible for defining the visual appearance of your site.

Site Structure Files

TemplatePurpose
header.phpContains elements that appear in the header at the top of every page.
footer.phpContains elements that appear in the footer at the bottom of every page.
sidebar.phpContains elements that appear in the sidebar at the side of every page.
single.phpTemplate for displaying individual posts.
page.phpTemplate for displaying individual pages.
comments.phpTemplate for displaying comments on posts and pages.
404.phpTemplate for displaying a custom error message when a page is not found.

Function Files

TemplatePurpose
functions.phpContains code that controls the theme’s functions and interactive elements.
archive.phpContains code for displaying archives
searchform.phpDefines the appearance of the search form.
search.phpContains 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. 

wp-cheatsheets-theme-def-2

This information is displayed on the theme’s page when you look at it via the Appearance – Themes options.

wp-cheatsheets-theme-def-1

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. 

ElementUser InputDescription
Theme NameStringThe name of the theme
Theme URIURLLink to the theme’s website or documentation
AuthorStringThe name of the theme’s author
Author URIURLLink to the author’s website
DescriptionTextOverview of the theme, its audience, features, etc.
Requires at leastVersion numberMinimum version of WordPress needed to run this theme
Tested up toVersion numberHighest version of WordPress the theme was tested with
Requires PHPVersion numberMinimum version of PHP needed to run this theme
VersionVersion numberCurrent version of the theme
LicenseStringLicense under which the theme is distributed (e.g., GPLv2)
License URIURLLink to the license information
Text DomainStringUnique identifier for theme translations
TagsArray of stringsKeywords 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. 

wp-cheatsheets-get-tag

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

TagPurpose
<?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

TagPurpose
<?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

TagPurpose
<?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. 

wp-cheatsheets-nav-menu

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. 

wp-cheatsheets-loop

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: 

CodeDescription
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 TagDescription
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.

FunctionDescription
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. 

wp-cheatsheets-gutenberg

Below is a complete list of the shortcuts you can use to save time when working in Gutenberg. 

FunctionWindows ShortcutMac Shortcut
Open SearchCtrl + KCmd + K
Add a new blockEnterEnter
Duplicate selected block(s)Ctrl + Shift + DCmd + Shift + D
Remove selected block(s)Alt + Shift + ZControl + Option + Z
Insert new block before selectionCtrl + Alt + TCmd + Option + T
Insert new block after selectionCtrl + Alt + YCmd + Option + Y
Change block type//
Clear selectionEscEsc
RedoCtrl + Shift + ZCmd + Shift + Z
Show/hide settings barCtrl + Shift + ,Cmd + Shift + ,
Open block navigation menuAlt + Shift + OOption + Control + O
Navigate to next part of editorAlt + Shift + NOption + Control + N
Navigate to previous part of editorAlt + Shift + POption + Control + P
Navigate to nearest toolbarAlt + F10fn + Option + F10
Switch between Visual and Code EditorCtrl + Shift + Alt + MCmd + Option + Shift + M

8. Elementor Hotkeys 

The Elementor page builder also has its own array of keyboard shortcuts known as hotkeys. 

wp-cheatsheets-elementor

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.

FunctionWindows ShortcutMac Shortcut
Responsiveness ModeCtrl + Shift + MCmd + Shift + M
Template LibraryCtrl + Shift + LCmd + Shift + L
NotesShift + CShift + C
Keyboard ShortcutsCtrl + ?Cmd + ?
QuitEscEsc
FinderCtrl + ECmd + E
Show/Hide PanelCtrl + PCmd + P
Site SettingsCtrl + KCmd + K
StructureCtrl + ICmd + I
Page SettingsCtrl + Shift + YCmd + Shift + Y
HistoryCtrl + Shift + HCmd + Shift + H
User PreferencesCtrl + Shift + UCmd + 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 

Advanced Tutorials 

WordPress Development Tools 

Troubleshooting

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.

A team of WordPress experts that love to test out new WordPress related software, WordPress plugins and WordPress themes.