WordPress Cheat Sheet (For Novices & Builders)

Beneath you’ll discover a WordPress Cheat Sheet that’s cut up into three elements:

  • WP-CLI (Novices)
  • WordPress Theme Improvement (Builders)
  • WordPress Keyboard Shortcuts

We’ve made it accessible each in PDF and PNG (as an infographic).

PDF Model of WordPress Cheat Sheet

WordPress Cheat Sheet (Obtain PDF)

Infographic Model of WordPress Cheat Sheet (PNG)

WordPress Cheat Sheet (Obtain PNG)

WordPress Cheat Sheet Summary

WordPress Cheat Sheet

Commonest capabilities, instructions, and keyboard shortcuts that will help you together with your WordPress theme improvement journey.

WP-CLI Cheat Sheet

WP-CLI is the command-line interface for WordPress. You may replace plugins, configure multisite installations and far more, with out utilizing an online browser.

Obtain WordPress

wp core obtain

Generate wp-config.php file

wp core config – dbname=
--dbuser= – dbpass=

Set up WordPress

wp core set up – url=​"your_domain_name"
--title=​"Your Blog Title"​ – admin_user=​"admin"

Search plugin

wp plugin search yoast

Set up plugin

wp plugin set up pluginname

Listing plugins

wp plugin listing

Listing put in themes

wp theme listing

Seek for new themes

wp theme search key phrase

Set up theme

wp theme set up bootstrap-four

Activate theme

wp theme activate bootstrap-four

Listing posts

wp submit listing

Edit submit

wp submit edit 1

Submit replace

 wp submit replace 1
--post_title=​"Your New title..."

Create posts

wp submit create
--post_title=​"Second Post"

Login WordPress db

wp db cli

Listing WordPress customers

wp db question ​"SELECT user_login, ID FROM wp_users;"

Change WordPress submit creator

wp submit replace 6 – post_author=1

Optimize db

wp db optimize

Replace WordPress

wp core replace

Replace WordPress DB

wp core update-db

Replace all plugins

wp plugin replace – all

WordPress Themes Improvement Cheat Sheet

WordPress Themes Improvement Cheat Sheet (Develop)‘, ‘WordPress Themes Improvement Cheat Sheet (Shut)‘); return false;” class=”wpex-link” id=”wpexlink565155189″ href=”https://websitesetup.org/wordpress-cheat-sheet/#”>WordPress Themes Development Cheat Sheet (Expand)

WordPress Theme Definition

Your theme’s information is stored in the theme’s main style.css file. The information is displayed when you view your theme on Appearance > Themes or on WordPress’ theme repository (if it’s submitted and approved).

Theme Identify: Twenty Seventeen
Theme URI: https://wordpress.org/themes/twentyseventeen/
Creator: the WordPress staff
Creator URI: https://wordpress.org/
Description: Twenty Seventeen brings your website to life with immersive featured photos and delicate animations. With a deal with enterprise websites, it options a number of sections on the entrance web page in addition to widgets, navigation and social menus, a emblem, and extra. Personalize its asymmetrical grid with a {custom} colour scheme and showcase your multimedia content material with submit codecs. Our default theme for 2017 works nice in lots of languages, for any talents, and on any machine.
Model: 1.0
License: GNU Basic Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Textual content Area: twentyseventeen
Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
This theme, like WordPress, is licensed below the GPL.
Use it to make one thing cool, have enjoyable, and share what you've got discovered with others.

WordPress Template Information

Fundamental recordsdata each WordPress theme ought to have:

fashion​.css          // Theme's major stylesheet file
index​.php          // Fundamental template file
single​.php         ​// Single submit file.
                   // ..Used for to show single posts solely
archive​.php        // Archive or Class template file
searchform​.php     // Search kind file 
search​.php         // Search outcomes file
404​.php            // 404 error web page file.
                   // ..Will likely be displayed if no web page might be discovered.
reviews​.php       // Feedback template file
footer​.php         // Footer content material file
header​.php         // Header content material file
sidebar​.php        // Sidebar content material file
web page​.php           // Single web page file. Used for pages solely.

WordPress Template Anatomy


wp_nav_menu​(); ​// (registered in capabilities.php)

The Loop

web page​.php





Not Displayed

fashion​.css               // Theme fashion
capabilities​.php           // Theme capabilities
reviews​.php            // Feedback template

WordPress Template Tags

Template tags are used inside themes to retrieve content material out of your database.

The content material could possibly be something from a weblog title to an entire sidebar.

Template tags are the popular technique to tug content material into your theme as a result of: they’ll print dynamic content material; they can be utilized in a number of theme recordsdata; they usually separate the theme into smaller, extra comprehensible, sections.

the_content​()                      Get submit content material
the_excerpt​()                      Get the submit excerpt
the_title​()                        Get the title of the submit
the_permalink​()                    Show submit hyperlink
the_category​(​', '​)                 Show class of a submit
the_author​()                       Present submit creator
the_ID​()                           Show submit ID
edit_post_link​()                   Present Edit hyperlink for a submit
next_post_link​(​'%hyperlink'​)            Show subsequent web page URL
previous_post_link​(​'%hyperlink'​)        Show earlier web page URL
get_links_list​()                   Retrieve blogroll hyperlinks
wp_list_pages​()                    Retrieve all pages
wp_get_archives​()                  Retrieve archive for the location
wp_list_cats​()                     Retrieve all classes
get_calendar​()                     Present the built-in WordPress calendar
wp_register​()                      Present register hyperlink
wp_loginout​()                      Shows login or logout hyperlinks (for registered customers)

Embody Tags

Use these tags to incorporate templates to your theme.

               Contains header.php and show its content material
              Contains sidebar.php
               Contains the footer.php
        Load particular template for reviews

Helpful Header Features

site_url​()                              Get WordPress website url
wp_title​()                              Get web page title
bloginfo​(​'identify'​)                        Get weblog identify
bloginfo​(​'description'​)                 Get weblog description
get_stylesheet_directory_uri​()          Get stylesheet listing URI
bloginfo​(​'atom_url'​)                    Get Atom feed URL
bloginfo​(​'rss2_url'​)                    RSS 2.0 URL

The Loop

The Loop is the default mechanism WordPress makes use of for outputting posts by a theme’s template recordsdata.

    // Show submit content material 

WordPress Menu and Sidebars

Default Navigation Menu

Particular Navigation Menu

 My Navigation​' )); ?>

Class Based mostly Navigation

<​ul​ ​id​=​"menu"​>
  <​li​  class="current-cat" ​​>
    <​a​ ​href​=​""​>House

Web page Based mostly Navigation

<​ul​ ​id​=​"menu"​>
  <​li​  class="current-page-item" ​​>
    <​a​ ​href​=​""​>House

Registering New Sidebar

Add the next code to your capabilities.php file to register a brand new sidebar.

add_action( ​'widgets_init'​, ​'theme_slug_widgets_init'​ );
perform​ ​theme_slug_widgets_init​() {
  register_sidebar( ​array​(
​    'identify'​ => __( ​'My Sidebar'​, ​'theme-slug'​ ),
​    'id'​ => ​'sidebar-1'​,
​    'description'​ => __( ​'Description',​ ​'theme-slug'​ ),
    'before_widget'​ => ​'
  • '​, 'after_widget'​ => ​'
  • '​, ​'before_title'​ => ​'

    '​, ​ 'after_title'​ => ​'

    '​, )); }

    WordPress Keyboard Shortcuts

    WordPress Keyboard Shortcuts Cheat Sheet (Develop)‘, ‘WordPress Keyboard Shortcuts Cheat Sheet (Shut)‘); return false;” class=”wpex-link” id=”wpexlink834891269″ href=”https://websitesetup.org/wordpress-cheat-sheet/#”>WordPress Keyboard Shortcuts Cheat Sheet (Expand)

    Alt + Shift + ​Key

    Windows/Linux: ​”Alt + Shift + ​Key“​.

    Mac:​ “Ctrl + Option (alt) + K​ey​”. (​WordPress 4.2 below use “Alt + Shift + Key”).

    n          Examine Spelling (This requires a plugin.)
    l          Align Left
    j          Justify Textual content
    c          Align Middle
    d          Strikethrough
    r          Align Proper
    u          • Listing
    a          Insert hyperlink
    o          1. Listing
    s          Take away hyperlink
    q          Quote
    m          Insert Picture
    w          Distraction Free Writing mode
    t          Insert Extra Tag
    p          Insert Web page Break tag
    h          Assist
    x          Add/take away code tag
    1          Heading 1
    2          Heading 2
    3          Heading 3
    4          Heading 4
    5          Heading 5
    6          Heading 6
    9          Handle

    Ctrl + Key

    Home windows and Linux:​ “Ctrl + Okay​ey“​,
    Mac:​ “Command + ​Key“.

    c          Copy
    v          Paste
    a          Choose all
    x          Reduce
    z          Undo
    y          Redo
    b          Daring
    i          Italic
    u          Underline
    ok          Insert/edit hyperlink

    Formatting Shortcuts

    Formatting Shortcuts whereas utilizing visible editor.

    *         Begin an unordered listing
    -         Begin an unordered listing
    1.        Begin an ordered listing
    1)        Begin an ordered listing
    ##        H2
    ###       H3
    ####      H4
    #####     H5
    ######    H6
    >         Rework textual content into blockquote
    - –       Horizontal line
    `..`      Rework textual content into code block

    Leave a Reply

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