{"id":2711,"date":"2017-11-03T09:58:42","date_gmt":"2017-11-03T09:58:42","guid":{"rendered":"https:\/\/staging.elixirrdigital.com\/us\/2017\/11\/03\/learning-wordpress-works-hood\/"},"modified":"2025-03-05T16:12:05","modified_gmt":"2025-03-05T16:12:05","slug":"learning-wordpress-works-hood","status":"publish","type":"post","link":"https:\/\/staging.elixirrdigital.com\/us\/2017\/11\/03\/learning-wordpress-works-hood\/","title":{"rendered":"Learning How WordPress Works Under the Hood"},"content":{"rendered":"<p>Over the many years that WordPress has existed, it has constantly grown and become a more and more complex Content Management System (CMS). This means the broad set of features available allows anyone from a developer to a regular user to use it in a variety of different ways. Essentially, you\u2019re able to chop and change it as you wish.<\/p>\n<p>This however means that WordPress is not without its challenges. Because it can do so many things easily, it&#8217;s a very difficult system to understand under the hood.<\/p>\n<p>To understand how WordPress works, you need to know how the data that powers a WordPress site is stored and how it\u2019s used. Data is stored in different categories, with the main four of them being split down further into two.<\/p>\n<p>The four main categories of data are:\n<\/p>\n<ul>\n<li>Posts<\/li>\n<li>Comments<\/li>\n<li>Users<\/li>\n<li>Terms<\/li>\n<\/ul>\n<p>Each of those four categories are then split into core data and meta data. Without going down the rabbit hole, this abstract method of data design makes managing WordPress super easy. It means that when a plugin extends a WordPress site and needs to work with data, it\u2019s very straight forward.<\/p>\n<h2>Posts<\/h2>\n<p><center><img decoding=\"async\" class=\"aligncenter size-full wp-image-8767\" src=\"https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/2025\/03\/posts.png\" alt=\"\"><\/center>What most people may not know is that Posts, Pages and Attachments are hooked into WordPress like any other Custom Post Type (CPT). This means that you can remove posts with one line of code if you really wanted to, that\u2019s how flexible things are.<\/p>\n<p>CPT is a name given to describe posts in WordPress. Everything is a post. From Posts (the blog articles you publish), to pages and attachments. For example, if you have a Case Studies section in your WordPress dashboard, that\u2019s a custom-made CPT. It essentially makes it easier to structure content on your website.<\/p>\n<p>CPTs have a selection of options that are always available, unless you explicitly wish to turn them off. These include but aren\u2019t limited to a post title, content, slug (the URL of the page), template\u2026 the list goes on. The options can be removed just as easily as they can be added in too, so they\u2019re highly extendable.<\/p>\n<p>As an example of this, let\u2019s say you\u2019ve created a new CPT called \u2018Documents\u2019 where each single document will have a file that people can download. When the post type is added, it\u2019ll appear on the left hand-side menu in the admin dashboard. You can then add content to it and upload an attachment and put it in the content area. Once you\u2019re done, you click save and then it\u2019s accessible on the front-end of the website just like a blog post would be.<\/p>\n<p>The main thing that separates different post types is the slug. Slugs from a WordPress point of view are the URLs that point towards posts. The Documents CPT slug would be &#8216;\/documents\/&#8217; and the new document post you made would have a slug based on the title of said post. For example if the new document was called Business Strategy, the slug would be &#8216;\/business-strategy\/&#8217;. To access that post on the front-end of the website, you\u2019d go to &#8216;\/documents\/business-strategy\/&#8217; where the post slug is appended to the CPT slug that it is a part of.<\/p>\n<p>That\u2019s how posts work &#8211; but you need to know when you should use them and when you shouldn\u2019t use them. In reality, you can use them whenever you want, or completely avoid them. But it is best practice to use posts when you\u2019re going to be publishing content regularly, almost in a series sort of fashion. Some examples that would fit nicely are:<\/p>\n<ul>\n<li>Documents that you\u2019ll add or remove from time to time<\/li>\n<li>Case studies or a portfolio with the work you\u2019ve done<\/li>\n<li>Products that you wish to sell in your shop<\/li>\n<\/ul>\n<p>It\u2019s worth noting that the last point, Products, is only a good idea if you don\u2019t plan to sell those products. If you\u2019re wanting to sell products from your website, an e-commerce solution would be much more suitable instead. Although if you plan to just showcase what you can offer, defining a new Custom Post Type would work very well.<\/p>\n<h2>Comments<\/h2>\n<p><center><img decoding=\"async\" class=\"aligncenter size-full wp-image-8766\" src=\"https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/2025\/03\/comments.png\" alt=\"\"><\/center>Thankfully, comments are more straightforward. Unlike defining Custom Post Types, comments are almost two dimensional. They\u2019re always attached to a post and have six fundamental bits of data. The post it relates to, the author\u2019s name, email address, website and the comment itself.<\/p>\n<p>Due to the nature of comments and how they\u2019re used, there\u2019s not much else to say about them. Unless you\u2019re looking to do some extreme extending to the functionality of comments, they\u2019ll stay mostly the same.<\/p>\n<h2>Users<\/h2>\n<p><center><img decoding=\"async\" class=\"aligncenter size-full wp-image-8768\" src=\"https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/2025\/03\/users.png\" alt=\"\"><\/center>Much like comments, users are somewhat similar to the two-dimensional design outlined above. However, there\u2019s an additional layer to users which we need to have in order to have a proper Content Management System. Users are accounts that people can use to login to the website and do things. They act as a gateway for you to perform a variety of actions on the website depending on your role (what kind of things you can actually do).<\/p>\n<p>Roles, much like posts, get very complicated as they are made up of capabilities. To begin with, WordPress has roles such as Administrator, Editor, Author, Contributor and Subscriber with the addition of Super Admin when you are using a WordPress multisite.<\/p>\n<p>So, how do roles and capabilities work? Capabilities are the individual permissions that allow you to do something from publishing a post, to editing a comment, or deleting another user. A specific collection of capabilities are then assigned to a role (like Editor) and the role is then assigned to the user. To make matters more complicated, users can have multiple roles.<\/p>\n<p>Let\u2019s say we have a role called Columnist that can create new posts, edit them and publish them and another role called Manager which can add, edit and delete other user accounts. You could, if you didn\u2019t want to let someone do everything on the website (with a role like Administrator), assign them the roles of Columnist and Manager so they have all capabilities they need (some might be reserved for Administrators only like deleting users) but without giving them too many permissions that aren\u2019t necessary for what they are doing.<\/p>\n<p>To sum up, a user can have multiple roles in which they have multiple capabilities enabling the user to perform a subset of actions. If your website has lots of users which should only do very specific tasks, this makes it very easy to delegate tasks to people without letting everyone have an administrator account.<\/p>\n<h2>Terms and Taxonomies<\/h2>\n<p><center><img decoding=\"async\" class=\"aligncenter size-full wp-image-8782\" src=\"https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/2025\/03\/categories.png\" alt=\"\"><\/center>Last but by no means least are Terms which are used to categorise posts. Terms are defined as one of two options. They are either hierarchical or non-hierarchical. The difference between the two can be distinguished by looking at how categories and tags work for the standard &#8216;Post&#8217; type (regular blog articles). A post can have lots of tags, such as food, drink, cooking and kitchen but should only have one or two categories which can be nested. You could for example have a category called Food &amp; Drink, with a sub category called Baking, with a further sub category called Cakes. Categories should be seen as defined sections within your blog, where posts on this subject are somewhere and posts on a different subject are somewhere else. Tags on the other hand are much more like the word association game. A post that has a tag called Baking may appear alongside a post tagged with Sports but they\u2019re related because they both share the same mutual tag of Activities.<\/p>\n<p>To make matters even more complicated, there also Taxonomies. These are collections of custom terms used for Custom Post Types. Let\u2019s say you have a CPT defined as Recipes, which are guides you\u2019ve written on how to create a variety of dishes. To categorise these recipes properly, you define a custom taxonomy called Cooking Types. Cooking Types is the taxonomy (the collection) and the individual Cooking Types such as Baking, Decorating and Roasting are the terms. Finally, to sum all of this up, terms are linked to taxonomies, and taxonomies are linked to CPTs.<\/p>\n<h2>Understanding WordPress Further<\/h2>\n<p>Without diving deep into the code itself, there\u2019s not a huge amount left to know about WordPress and how it all works behind the scenes. Whilst it may seem complicated to understand when simply reading about it, using it is much more straight forward when you have the interface to work with.<\/p>\n<p>This is why it\u2019s such an advanced and extensive product. These are just a few of the reasons why it works well for both large scale businesses and for hobbyist bloggers, needing less taxing customisations. Without the ability to shape the data it uses in this useful way, it would make things very difficult and reduce its effectiveness dramatically.<\/p>\n<p>What do you think about using WordPress overall? Do you find it difficult to get used to or are you fully au fait with what everything is doing? We have a very thorough understanding of WordPress here at Coast, but even we learn something new every now and again!<\/p>\n<p>If you&#8217;re interested in learning more, we&#8217;ve produced a guide, myth-busting 5 of the most common misconceptions about WordPress: <a href=\"https:\/\/staging.elixirrdigital.com\/us\/guides\/5-wordpress-myths-debunked\/\" target=\"_blank\" rel=\"noopener\">5 WordPress Myths Debunked<\/a>.<\/p>\n<p>You can download your free copy by clicking on the image below.<\/p>\n<p><center><a href=\"https:\/\/staging.elixirrdigital.com\/us\/guides\/5-wordpress-myths-debunked\/\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-8772\" src=\"https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/2025\/03\/wordpress-myths-guide-cover-e1509704903731.png\" alt=\"\"><\/a><\/center><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the many years that WordPress has existed, it has constantly grown and become a more and more complex Content Management System (CMS). This means the broad set of features&hellip;<\/p>\n","protected":false},"author":10,"featured_media":2712,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"related_service":[53],"related_industry":[],"class_list":["post-2711","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"card":"<article class=\"wp-component-card wp-component-card--dark wp-component-card--resource wp-component-card--post wp-component-card--full-width            wp-component-card--link js-card-link\n        \">\n            <div class=\"wp-component-card__image\">\n            <img width=\"780\" height=\"508\" src=\"https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/sites\/2\/2025\/03\/wordpress-small.jpeg\" class=\"attachment-card-1-col size-card-1-col\" alt=\"wordpress-small\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/sites\/2\/2025\/03\/wordpress-small.jpeg 780w, https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/sites\/2\/2025\/03\/wordpress-small-300x195.jpeg 300w, https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/sites\/2\/2025\/03\/wordpress-small-768x500.jpeg 768w, https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/sites\/2\/2025\/03\/wordpress-small-200x130.jpeg 200w, https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/sites\/2\/2025\/03\/wordpress-small-154x100.jpeg 154w, https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/sites\/2\/2025\/03\/wordpress-small-245x160.jpeg 245w, https:\/\/staging.elixirrdigital.com\/us\/wp-content\/uploads\/sites\/2\/2025\/03\/wordpress-small-61x40.jpeg 61w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/>        <\/div>\n        <div class=\"wp-component-card__content\">\n        <div class=\"wp-component-card__content-top\">\n                                                    <p class=\"wp-component-card__eyebrow\">\n                    Blog                <\/p>\n                        <a href='https:\/\/staging.elixirrdigital.com\/us\/2017\/11\/03\/learning-wordpress-works-hood\/'>\n        <h2 class='wp-component-card__title'>\n            Learning How WordPress Works Under the Hood\n        <\/h2>\n    <\/a>        <\/div>\n                    <div class=\"wp-component-card__content-bottom\">\n                                    <p class=\"wp-component-card__description\">\n                        Over the many years that WordPress has existed, it has constantly grown and become a more and more complex Content Management System (CMS). This means the broad set of features&hellip;                    <\/p>\n                                                                    <div class=\"wp-component-card__meta\">\n                                                    <p class=\"wp-component-card__date\">\n                                03 November 2017                            <\/p>\n                                                                            <div class=\"wp-component-card__terms\">\n                                                                                            <div class=\"wp-component-tags__tag\">\n                Web Design &amp; Development            <\/div>\n                                                                                                            <\/div>\n                                            <\/div>\n                                            <\/div>\n            <\/div>\n<\/article>\n","_links":{"self":[{"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/posts\/2711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/comments?post=2711"}],"version-history":[{"count":0,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/posts\/2711\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/media\/2712"}],"wp:attachment":[{"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/media?parent=2711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/categories?post=2711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/tags?post=2711"},{"taxonomy":"related_service","embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/related_service?post=2711"},{"taxonomy":"related_industry","embeddable":true,"href":"https:\/\/staging.elixirrdigital.com\/us\/wp-json\/wp\/v2\/related_industry?post=2711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}