Numerous posts in this weblog strive to give an explanation for WordPress ideas and terminology, or a minimum of the ones which can be related to the put up. And the WordPress Codex does a really perfect process of explaining the ideas utilized by WordPress.

However following a lot of questions I’ve noticed in feedback on posts requesting definitions and explanations, I assumed it could be helpful to create a jargon buster for WordPress customers and builders.

So on this put up I’ll try to outline and provide an explanation for one of the vital key ideas in WordPress. A few of these are extra related for customers, others for builders, and a few for each.

I’m going to take every time period alphabetically, so you’ll in finding them simply when you don’t know the place they have compatibility on the subject of context. However first right here’s a listing of the phrases I’ll outline, damaged down via large subject:

I understand this isn’t an exhaustive listing of WordPress terminology and that when you’re a complicated developer (or hoping to grow to be one) there is also issues I’ve ignored out. However this must duvet nearly all of questions that almost all of our readers ask.

Motion Hook

An motion hook is a line of code added to a WordPress core report, a theme or plugin which helps you to insert further code via attaching a function to it.

So as to add an motion hook for your theme or plugin, you upload this code:

After which to run a serve as known as myfunction at that time in the code, you connect it to the hook the usage of add_action:

If you wish to upload code which will also be overridden or altered with a serve as (as a substitute of making an empty spot for code to be added), you employ a filter hook.

API

API stands for Application Programming Interface. It’s a codebase that allows you to engage with one gadget from every other gadget.

An API can can help you engage with one a part of a gadget from every other a part of the similar gadget, or it may possibly can help you achieve this from an exterior gadget. An instance of the primary is the Widgets API, which helps you to write plugins to create widgets, whilst an instance of the second one is the WordPress REST API, or the Google Maps API which you could use when you’re coding a mapping plugin.

Attachment

An attachment is a report that you just add to a page or post in your web page. It may well be a picture, video, or audio clip that you just embed on your content material, or it is usually a report this is accessed via a clickable hyperlink that WordPress creates whilst you add the report.

Attachment is a post type in WordPress: it’s one of the vital put up sorts that incorporates WordPress out of the field.

Capacity

An ability shall we a person carry out a given motion, similar to enhancing posts (edit_posts) or putting in plugins (install_plugins).

Every person role has an outlined set of features assigned to it, which outline what some with that position can do. You’ll upload or take away features from roles the usage of the add_cap() and remove_cap() purposes.

Class

Class is an inbuilt taxonomy that incorporates WordPress, that you’ll use to categorise your posts. Classes are hierarchical, this means that they are able to have father or mother and kid classes.

category editing screen
Upload classes to construction your web page’s content material

Classes have a tendency to be used for sections of the web page or main subject matters or subjects, as in opposition to tags which you usually use extra of. In maximum websites the variation is that you’d use classes to construction your web page, including them to the navigation menu, which you wouldn’t with tags. Every class you outline is a term within the ‘class’ taxonomy.

Elegance

A category is one of those programming utilized in Object Oriented PHP. The usage of a category as a substitute of a load of separate purposes makes your code cleaner and more straightforward to increase.

A category will include various similar purposes (referred to as methods): as an example, the WP_Widget elegance contains purposes to populate the widget, to avoid wasting what’s enter into it and to output it at the web page. You’ll then write a brand new elegance in a plugin or theme that extends the unique elegance via amending or including to precise portions of it, saving you from having to rewrite the entire thing.

Kid Theme

A kid theme is a theme which you employ so as to add further code to a father or mother theme. If you wish to edit a theme you’ve purchased or put in from the theme listing you must all the time use a kid theme to do that, as a substitute of enhancing the theme immediately. It’s because any adjustments you are making to the theme will likely be misplaced when it’s up to date.

To inform WordPress {that a} theme is a kid theme, you add extra code to the theme stylesheet with main points of the father or mother theme. Kid subject matters can be utilized so as to add tweaks to a father or mother theme, to make vital customizations, so as to add further styling, purposes or template files, or along side a theme framework.

CMS

A CMS, or Content material Control Machine, is a gadget that shall we customers upload content material to a site with no need to immediately code that content material into internet pages. WordPress is the sector’s hottest CMS!

A CMS wishes a database to retailer content material after which a suite of recordsdata (in WordPress, a theme) which will likely be used to output that content material right into a internet web page, producing front-end languages like HTML and JavaScript. It is going to in most cases use a back-end programming language like PHP to do that.

Config Document

The config report, or wp-config.php, defines how your WordPress set up is configured. It’s every now and then edited via WordPress itself as you are making adjustments within the admin monitors, or you’ll edit it immediately (with care!). Use it to turn on Multisite or to show debugging on or off.

Customizer

The WordPress Customizer is an interface that allows you to make adjustments to the portions of your web page that you’ll’t edit by the use of the put up editor. Precisely what options you’ve get admission to to is determined by your theme (and every now and then plugins), however there are some default components together with widgets, menus, and web page identification. Your theme would possibly then additionally can help you customise the format and colours and upload textual content within the header and/or footer.

The WordPress Customizer
The Customizer makes it simple so that you can customise your web page in actual time

All subject matters submitted to the theme directory at the moment are required to make use of the Customizer as a substitute of theme choices monitors. The good thing about that is that customers can see the adjustments they’re making as they lead them to. So as to add Customizer capability for your personal subject matters, practice our guide.

Customized Box

Customized box is in a different way of describing put up metadata. Use customized fields so as to add further knowledge for your posts similar to your temper whilst you had been writing, the elements and so forth. You shouldn’t use customized fields to categorise your posts: use categories or tags as a substitute.

So as to add customized fields, use the interface at the put up enhancing display screen. On the other hand, you’ll create your individual metabox to make customized fields even more straightforward to paintings with.

Database

The database retail outlets all the knowledge in relation to your WordPress set up. This will likely come with content material (posts, pages, attachments and so forth.), person knowledge and choices similar to configurations you’ve made to plugins.

The database is composed of 11 tables. In case your web page is a Multisite community there will likely be further tables for every web page, even supposing person knowledge is shared throughout the entire community in two tables: wp_users and wp_usermeta.

You must by no means edit the database immediately: as a substitute, use the WordPress admin monitors to make adjustments.

Database Desk

A desk within the WordPress database holds a particular more or less knowledge. As an example, wp_posts holds knowledge in relation to posts (which incorporates all post types, no longer simply Posts). There also are tables for taxonomy terms, for options and for metadata similar to put up metadata.

Filter out Hook

A clear out hook is coded right into a WordPress core report or a theme or plugin. It encloses default code which you’ll then override via writing a serve as and attaching it that hook.

So as to add a clear out for your theme or plugin, you employ code one thing like this:

Then if you wish to trade that default code or textual content, you write a serve as with the brand new content material and hook it to the clear out like so:

You’ll additionally hook purposes to clear out hooks supplied via WordPress, to override default code.

The variation between a clear out hook and an action hook is that an motion hook is empty: code is simplest added to it when a serve as is hooked to it. A clear out hook isn’t empty: it’s wrapped round default textual content or code that will likely be output if no serve as is connected to the hook.

Serve as

A serve as is a block of code that you just write into your theme or plugin to make one thing occur. WordPress core recordsdata additionally include masses of purposes.

You’ll employ core WordPress functions on your personal code or you’ll write your individual: it’s all the time a good suggestion to test that there isn’t already one who does what you want ahead of you begin to create a brand new one.

You’ll write a serve as inside of every other one: it’s commonplace to put in writing your individual serve as which comprises a number of WordPress purposes.

To get a serve as to fireplace, you’ll write it immediately right into a theme or plugin report, during which case it’ll hearth at that time on your report. On the other hand, you’ll hook it to an action hook or filter hook. The good thing about doing that is that you’ll insert the serve as at a couple of issues on your code or you’ll override or take away it at a later degree with no need to edit the theme or plugin recordsdata. That is just right observe when you’re growing subject matters or plugins for others to make use of and makes them extendable.

To code a serve as you give it a novel identify adopted via brackets (inside of which you’ll optionally upload parameters) after which upload the serve as code inside of curly braces:

Purposes Document

The purposes report (purposes.php) is a report in a theme that doesn’t show content material on pages. As an alternative, you employ it so as to add capability for your theme. The purposes report will come with such things as including Customizer make stronger, featured symbol make stronger and any customized purposes you upload for your theme. A theme doesn’t need to have a purposes report to paintings.

When you’re including an excessive amount of capability by the use of the purposes report, you may well be writing  a plugin as a substitute. Plugins must be used for capability and subject matters for show.

Come with Document

An come with report is a report you upload to a plugin (or every now and then a theme) to carry code one after the other from the principle plugin report. It may be helpful to do that when including a considerable amount of code so as to add particular capability. As an example, I might use an come with report so as to add Customizer make stronger to a theme.

To incorporate your report, use a function (similar to include_once()) inside of your major plugin report or your theme’s purposes report to name the come with report. This inserts the code from the report within the position the place you added the come with serve as.

Loop

The loop is the code on your theme that queries the database and fetches and outputs the present put up. For a unmarried put up or a web page it’ll run as soon as whilst on an archive web page it’ll loop again and again till all related posts had been output.

You’ll both upload the loop for your theme template files or to a template part, this means that you’ll use the similar loop in a couple of template recordsdata. For a information on how to do that, see our put up on theme development.

Meta Field

A meta field is a space in an admin display screen that you just use so as to add content material, configure settings, or carry out an motion. You’ll add meta boxes via writing your individual plugins.

The Add More metabox lets users add metadata to this post.
The Upload Extra metabox shall we customers upload metadata to this put up.

Meta packing containers are extremely helpful as they offer customers the versatility so as to add further content material spaces (the usage of metadata) or configurations with no need to go away the post-editing display screen or write any code.

Metadata

Metadata is knowledge about knowledge. Sure, that sounds ridiculous I do know. Let me provide an explanation for it with an instance.

WordPress retail outlets posts (and pages, attachments and so forth.) within the wp_posts desk within the database. Fields on this desk are restricted to a predefined list together with the put up identify, put up content material, date it was once created,  its standing and excerpt.

However what if you wish to upload further knowledge for your put up that isn’t lined via a kind of fields? That’s when you want metadata, every now and then known as custom fields. This will also be the rest you wish to have, from the elements whilst you created the put up to knowledge in relation to its search engine marketing.

To create and paintings with metadata, see our guide.

Manner

A technique is one thing that’s utilized in Object-Oriented Programming. It’s the way you describe a serve as that’s used inside of a class. Not anything mysterious about it!

Multisite Community

A Multisite community is a community of websites sharing one WordPress set up. By means of activating Multisite you’ll host as many websites in your WordPress set up as you want, from two to hundreds of thousands. For complete steerage on putting in and managing a Multisite community, see our ultimate guide to Multisite.

The navigation menu is a menu you set on your web page’s header to lend a hand folks navigate round your web page. Menu pieces are a post type in WordPress, and also you upload them by the use of the menus admin display screen or the Customizer.

You’ll additionally upload further navigation menus via coding them into your theme or the usage of a widget.

Nonce Keys

NONCE stands for Quantity used ONCE. It’s a host that may simplest be used as soon as, in most cases inside of a URL. So, as an example, if somebody makes an attempt to reset their password in WordPress they are going to be despatched a hyperlink that features a nonce. After they’ve clicked on that hyperlink they are able to’t use it once more. Which means that somebody else can’t use the similar hyperlink to modify their password once more.

Use nonces to make your code more secure, as an example when saving knowledge by the use of a plugin.

Object

In Object-Oriented Programming, an object is a package of variables and similar methods. Use them in classes to staff purposes in combination and make your code extra environment friendly and easer to increase.

Object-Orientated Programming

Object-Oriented Programming is a programming approach that makes use of objects, methods and classes to staff code in combination and provide help to lengthen. That is against this to purposeful programming which treats functions as separate entities.

Choices

An choice is one thing you’ll trade about your WordPress web page that isn’t a part of a put up, web page or another content material kind. As an alternative, it pertains to the web page settings or plugin or theme configuration. Choices also are known as settings.

Your entire web page’s choices are saved within the wp_options desk within the database, the one desk no longer connected to another tables.

Web page

A web page is a post type that comes as default with a typical WordPress set up. Use it for static content material that you just don’t wish to listing on your weblog web page or in other places at the web page. Widespread makes use of come with the house web page, an ‘About’ web page or a touch web page.

Some websites are based totally completely round pages as a substitute of posts. Those ceaselessly use a hierarchical construction, with father or mother and kid pages.

Plugin

A plugin is a suite of code that provides further capability for your WordPress web page. This may well be so simple as converting the login emblem or as complicated as including e-commerce capability.

You put in plugins by the use of the Plugins web page on your admin monitors. You’ll both write your individual, purchase them from a plugin seller or set up them from the plugin listing.

WordPress plugin directory

Needless to say plugins are for capability whilst themes are for show. So if you end up writing a large number of purposeful code into your theme, you may well be setting apart it out right into a plugin. That is higher observe and approach you’ll use the code once more in different websites working other subject matters.

Put up

That is the place issues can get complicated. A put up is a post type, however may also be used to confer with all put up sorts. For customers the time period ‘Put up’ in most cases approach the put up kind you employ to create weblog posts, articles, updates and so forth. For builders it may be used to explain all posts contained within the wp_posts desk, together with posts, pages and extra. Right here I’ll center of attention at the first that means.

So as to add a brand new Put up you employ the put up enhancing display screen in WordPress. Posts are distinct from pages in that they’re indexed in archive pages and your major weblog web page. When you’re a blogger, posts would be the lifeblood of your web page.

Put up Layout

Put up structure is a taxonomy that you’ll use to show your posts in several codecs. By means of developing template files for various put up codecs you’ll display such things as video, quotes, pictures and textual content another way.

Put up Sort

Post types are several types of content material that you just use for various functions. WordPress comes with various put up sorts to be had to you via default. Those are:

You’ll additionally upload your individual via registering a custom post type. To try this, use the register_post_type() serve as, which you upload for your personal serve as defining the arguments in your put up kind similar to its identify and the way it behaves.

Many plugins create customized put up sorts for bespoke content material similar to merchandise for e-commerce websites, bureaucracy so as to add shape capability and galleries for showing pictures.

Assets

In Object Oriented Programming, a assets is a variable you employ with methods to retailer and output knowledge.

Question

WordPress runs a question each and every time it get admission to the database and fetches content material to output. So each and every web page in your web page will likely be populated via a query, which is coded by the use of the loop.

WordPress routinely queries the proper content material relying on what’s being considered. So when you’re having a look at a unmarried put up, the code within the loop will fetch that put up, whilst when you’re having a look at an archive web page the loop will run time and again till it’s output the entire posts it must on that web page.

You’ll additionally upload customized queries to pages to show further posts, or you’ll modify the principle question to modify what’s displayed. In finding out which strategies you must (and shouldn’t) use to do that in our guide.

Revision

A revision is a model of a put up (or web page and so forth.) that’s saved within the database in case you want to revert to it at a later date. This will also be helpful when you unintentionally delete some content material in your put up or one thing else is going flawed.

Post revisions metabox
Put up revisions are indexed within the put up enhancing display screen

WordPress routinely saves revisions for you at set time durations however you additionally create a revision each and every time you replace your put up or save a draft.

Position

A person role defines what that person is in a position to do in your web page. The default roles that include WordPress are:

  • Super Admin – can set up a Multisite community of websites (simplest related if Multisite has been activated).
  • Administrator – can set up a unmarried web page in a typical WordPress set up or a web page inside of a Multisite community..
  • Editor – can post and set up posts together with other folks’s posts. They are able to’t set up web page settings.
  • Author – can write, post and set up their very own posts however no-one else’s.
  • Contributor – can write and set up their very own posts however can’t post them. They publish them for an Editor or Administrator to study and post.
  • Subscriber – can’t upload content material however can view content material you’ve limited to subscribers or make feedback if that’s limited too.

Every position has a suite of capabilities which outline precisely what the person can do. You’ll edit a person position via including or casting off features, or you’ll create new roles the usage of the add_role() serve as.

SALT Keys

SALT keys are added for your wp-config.php report so as to add a layer of safety for your web page. Those are secret keys with out which WordPress gained’t paintings. There are 4 of them: AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY, and NONCE_KEY.

Those paintings via combating hackers from having access to the cookies that retailer knowledge about your web page (similar to login credentials). You must refresh them frequently – more or less each and every two months. Our safety plugin like Defender makes this simple.

Sanitization

Sanitization is the method of cleansing enter knowledge ahead of it’s stored. As an example, when you upload a meta box within the put up enhancing display screen with a textual content field, you use a sanitization serve as to make sure any textual content enter to it is saved in the proper structure.

So when you’re saving an electronic mail cope with, sanitization will make sure that it’s saved appropriately and can pop out of the database as an electronic mail cope with when it’s output in other places.

Sanitisation follows validation, which is set checking that inputs had been entered appropriately.

Settings

Settings are the configurations you are making for your web page or to plugins to get them running the way in which you wish to have them to. There are a selection of settings monitors in WordPress, and plugins and subject matters might upload their very own settings monitors too (even supposing a contemporary theme is much more likely to make use of the Customizer).

You get admission to your web page settings monitors by the use of the Settings menu within the admin. They’re additionally known as options.

Shortcode

A shortcode is a few textual content inside of sq. brackets that you upload for your posts, which then outputs or runs some code. Shortcodes can enclose textual content you upload ([myshortcode]Enclosed textual content[/myshortcode]), they are able to stand on my own ([myshortcode]), or they are able to have parameters ([myshortcode number=”10″]).

To create your own shortcodes, write a plugin the usage of the Shortcode API.

Stylesheet

The stylesheet is a theme report which incorporates all the CSS styling for the theme. It additionally comprises very important data at the theme similar to its identify, writer and model. It’s one of the vital two recordsdata each and every theme should include.

Tag

Tag is a integrated taxonomy inside of WordPress. Use it to spot posts on particular subjects, in additional element than you may with categories. You wouldn’t in most cases use tags to construction your web page however as a substitute you’d use a tag cloud widget to let guests in finding posts with a given tag.

Tags aren’t hierarchical so they are able to’t have father or mother or kid tags.

Taxonomy

A taxonomy is a classification of your posts (of no matter put up kind). WordPress comes with 4 integrated taxonomies:

You’ll additionally add your own custom taxonomies, which you’ll follow to present put up sorts similar to posts, pages our attachments, or to new customized put up sorts that you just sign in. You do that the usage of the register_taxonomy() serve as.

Taxonomies can behave in several techniques. Some (e.g. classes) are hierarchical, so every taxonomy term may have a father or mother. Others (e.g. tags) are non-hierarchical so their phrases are in a flat construction. Whilst you sign in a taxonomy you’ll specify whether or not or no longer it’s hierarchical.

Template Document

A template report is a report inside of your theme that’s used to output content material on a web page of your web page. Each theme should come with one template report: index.php. Maximum subject matters additionally come with template recordsdata for particular content material sorts, like web page.php, archive.php and unmarried.php.

WordPress comes to a decision which template report to make use of to show content material on a given web page consistent with the template hierarchy.

Template Hierarchy

The template hierarchy is the gadget WordPress makes use of to spot which template file to make use of when showing a given web page on a web page. Some template recordsdata are extra particular to person content material sorts than others: WordPress will paintings via them in descending order of specificity till it reveals one in your theme. Which means that in case your them doesn’t have a template report for a particular content material kind, it’ll fall again to a extra generic report, in the long run defaulting to index.php.

WordPress template hierarchy
The WordPress template hierarchy

So, as an example, when you open the archive of all posts with the term canine in a taxonomy known as animal, WordPress will paintings in the course of the template hierarchy on this order, the usage of the report it reveals first:

  1. taxonomy-animal-dog.php
  2. taxonomy-animal.php
  3. taxonomy.php
  4. archive.php
  5. index.php

Template Phase

A template phase is a theme report that comprises the code for only one a part of a template report. You employ this to retailer code that you wish to have to make use of in a couple of template files, such because the header (header.php), sidebar (sidebar.php) and footer (footer.php). You’ll name every of those with get_header(), get_sidebar() and get_footer() respectively, on your template recordsdata.

You’ll additionally use a template phase in different places in a template report, as an example to drag within the code for the loop. To try this you employ the get_template_part() serve as. Doing this makes your code extra environment friendly as you’re no longer repeating the similar code in a couple of template recordsdata.

Template Tag

A template tag is one of those function designed for use in theme template files. It ceaselessly fetches and presentations knowledge, such because the web page identify or description.

Time period

A time period is an merchandise in a taxonomy. So when you’ve added some categories for your posts, every of the ones classes is a time period within the class taxonomy.

You’ll upload taxonomy phrases via going to the taxonomy enhancing display screen (e.g. Posts > Classes) or via including them whilst you’re enhancing a put up.

Theme

A theme is a suite of recordsdata that WordPress makes use of to output content material. It is going to all the time come with a minimum of two recordsdata: taste.css and index.php. The stylesheet is important because it contains very important details about the theme and likewise provides styling for your web page. The index.php report contains code such because the loop which is used to fetch knowledge from the database and show it at the web page, plus template tags and different purposes which can output different knowledge and media in addition to including interactions.

Maximum subject matters come with lots extra recordsdata: the header.php, sidebar.php and footer.php template parts which output portions of the web page which can be commonplace to each and every web page, plus different template recordsdata for particular content material sorts similar to archives, pages and unmarried posts. WordPress chooses which one to make use of with regards to the template hierarchy.

Widget

A widget is one thing you’ll upload to a widget space on your web page (e.g. within the sidebar or footer) with out writing any code. You’ll do that via going to Look > Widgets within the admin or by the use of the Customizer.

customizer - editing widgets
You’ll edit widgets within the Customizer

Validation

Validation is the method of checking that knowledge is legitimate ahead of it’s stored to the database. You upload validation purposes on every occasion you’re coding some form of enter similar to a textual content field.

As an example, if the person is needed to enter an electronic mail cope with, validation will test that it seems like an electronic mail cope with, i.e. that it’s in the proper structure. If it isn’t, it gained’t be authorized and the person will see an error message. As soon as knowledge is validated it must be sanitized.

Is That The entirety?

WordPress has masses of phrases you can or would possibly not wish to get to journeys with relying on the way you’re the usage of it. Right here I’ve attempted to incorporate the whole thing that almost all of folks will wish to know.

If there’s the rest that’s stumped you permit a observe within the feedback and if sufficient folks ask for one thing I’ll upload a definition!

WordPress Developers

[ continue ]