{"id":160740,"date":"2016-11-18T13:00:34","date_gmt":"2016-11-18T13:00:34","guid":{"rendered":"https:\/\/premium.wpmudev.org\/blog\/?p=160740"},"modified":"2022-04-07T01:45:55","modified_gmt":"2022-04-07T01:45:55","slug":"the-wordpress-loop-explained","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/the-wordpress-loop-explained\/","title":{"rendered":"The WordPress Loop Explained"},"content":{"rendered":"<p>The WordPress loop is big. It&#8217;s huge. It&#8217;s critical. Without it, your WordPress site won&#8217;t work.<\/p>\n<p>By this, I don&#8217;t mean that it&#8217;s large. In fact, it should be as lean, tight and quick as possible. But it&#8217;s a major part of what makes WordPress, well, WordPress. Without it you can&#8217;t query the database and display your content, whether that&#8217;s your blog archive, your &#8220;About&#8221; page or your latest post.<\/p>\n<p>Nothing works without the WordPress Loop.<\/p>\n<p>So, now we&#8217;ve established how important the loop is, you might be wondering just what it is if you haven&#8217;t come across it before.<\/p>\n<p>In this post, I&#8217;ll answer that question. I&#8217;ll show you what the loop is, how it works and where it should go. I&#8217;ll also give you some tips for customizing the WordPress loop and making it work for you.<\/p>\n<p>Let&#8217;s start by identifying what the WordPress loop does and where it goes.<\/p>\n<p>Continue reading, or jump ahead using these links:<\/p>\n<ul>\n<li><a href=\"#wordpress-loops-and-where-to-find-it\">What is the WordPress Loop and Where Do I Find It?<\/a><\/li>\n<li><a href=\"#finding-loops-in-template-files\">Where&#8217;s the WordPress Loop? Finding it in Template Files<\/a><\/li>\n<li><a href=\"#loop-dissected\">The WordPress Loop Dissected<\/a><\/li>\n<li><a href=\"#customizing-loops\">Customizing the WordPress Loop<\/a><\/li>\n<\/ul>\n<h2 id=\"wordpress-loops-and-where-to-find-it\">What is the WordPress Loop and Where Do I Find It?<\/h2>\n<p>The WordPress Loop is a few (or sometimes many) lines of code that access the database, fetch any relevant content and then display it. The code will include PHP for accessing the database and a mix of PHP and HTML for outputting\u00a0what&#8217;s found.<\/p>\n<p>The reason it&#8217;s called the loop is because it loops &#8211; it repeats itself until there&#8217;s nothing else to display. When viewing a static page this means it&#8217;ll just loop once but on a category archive or your main blog page, it&#8217;ll keep on looping and outputting content until there&#8217;s nothing left to display.<\/p>\n<p>What the WordPress loop fetches and outputs depends on a few things:<\/p>\n<ul>\n<li>What kind of content is being viewed<\/li>\n<li>Any customizations you&#8217;ve made to the WordPress Loop (more of which later)<\/li>\n<li>The functions\u00a0you use to display items from the database (such as the post title, content, and any metadata)<\/li>\n<li>The HTML you wrap your content in.<\/li>\n<\/ul>\n<p>You&#8217;ll find the WordPress Loop in every template file in your theme. In this post, we&#8217;ll examine\u00a0the WordPress Loop in the current default theme, <a href=\"https:\/\/wordpress.org\/themes\/twentysixteen\/\" target=\"_blank\">twenty sixteen<\/a>. If you don&#8217;t already have access to that theme, download it and open it up in your favourite code editor. As we work through this post I&#8217;ll make reference to different files and chunks of code in that theme and it helps if you can take a look and follow along.<\/p>\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-1364x1364 size-1364x1364\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/11\/twenty-sixteen.png\" alt=\"In this post, I'll take apart the loop in the Twenty Sixteen default theme.\" width=\"1364\" height=\"632\" \/><figcaption class=\"wp-caption-text\">In this post, I&#8217;ll take apart the loop in the Twenty Sixteen default theme.<\/figcaption><\/figure>\n<h2 id=\"finding-loops-in-template-files\">Where&#8217;s the WordPress Loop? Finding it in Template Files<\/h2>\n<p>You&#8217;ll find the WordPress Loop in every theme template file, or you may find a function that pulls it in from a template part instead.<\/p>\n<p>A template part is a file containing\u00a0code that&#8217;s used repeatedly throughout the theme, of which the WordPress Loop is an example. So instead of repeating the loop in every single template file, each file pulls in the template part and runs the same code.<\/p>\n<p>You can use more than one included file in your theme so, for example, you might want just one version of the WordPress Loop for all archive pages and another for all single pages.<\/p>\n<p>Let&#8217;s take a look at the Twenty Sixteen theme to make sense of all this.<\/p>\n<p>Here&#8217;s the file structure of the theme:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/11\/twentysixteen-structure.png\" alt=\"The file structure of the twenty sixteen theme\" width=\"670\" height=\"459\" \/><\/p>\n<p>There are a bunch of template files:<\/p>\n<ul>\n<li><em>404.php<\/em><\/li>\n<li><em>archive.php<\/em><\/li>\n<li><em>footer.php<\/em><\/li>\n<li><em>image.php<\/em><\/li>\n<li><em>index.php<\/em><\/li>\n<li><em>page.php<\/em><\/li>\n<li><em>search.php<\/em><\/li>\n<li><em>single.php<\/em><\/li>\n<\/ul>\n<p>The theme also has some\u00a0template parts in the main folder:<\/p>\n<ul>\n<li><em>comments.php<\/em><\/li>\n<li><em>footer.php<\/em><\/li>\n<li><em>header.php<\/em><\/li>\n<li><em>searchform.php<\/em><\/li>\n<li><em>sidebar-content-bottom.php<\/em><\/li>\n<li><em>sidebar.php<\/em><\/li>\n<\/ul>\n<p>And it has more template parts inside the <em>template-parts<\/em> folder. Each of these will be called somewhere else in the theme. Other files such as <em>functions.php<\/em> and <em>style.css<\/em> have their own specific role.<\/p>\n<p>Let&#8217;s take a look at an example of the WordPress Loop. Firstly, open the <em>page.php<\/em> file.<\/p>\n<p>Here&#8217;s its code, in full:<\/p>\n<div class=\"gist\" data-gist=\"46d855f595e66f4a66cbafa8f02c75db\" data-gist-file=\"page-full\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/46d855f595e66f4a66cbafa8f02c75db.js?file=page-full\">Loading gist 46d855f595e66f4a66cbafa8f02c75db<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>So which part of this is the loop?<\/p>\n<p>Well. there&#8217;s one thing you need to look out for when looking for the loop, and that&#8217;s this line:<\/p>\n<div class=\"gist\" data-gist=\"5140dd3cc3b9c51a7596b3a97d540438\" data-gist-file=\"loop-begin\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/5140dd3cc3b9c51a7596b3a97d540438.js?file=loop-begin\">Loading gist 5140dd3cc3b9c51a7596b3a97d540438<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>This is what starts the WordPress Loop. And this line closes the loop:<\/p>\n<div class=\"gist\" data-gist=\"8da12831fa01fb248044926163078aeb\" data-gist-file=\"loop-close\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/8da12831fa01fb248044926163078aeb.js?file=loop-close\">Loading gist 8da12831fa01fb248044926163078aeb<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>So this means that the loop in this <em>page.php<\/em> template file is running using these\u00a0lines of code:<\/p>\n<div class=\"gist\" data-gist=\"135d44b633a2936bed2bfc57a3cf4b76\" data-gist-file=\"loop-page\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/135d44b633a2936bed2bfc57a3cf4b76.js?file=loop-page\">Loading gist 135d44b633a2936bed2bfc57a3cf4b76<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>But this doesn&#8217;t include the template tags and HTML that displays the contents of the WordPress Loop. Instead, that&#8217;s all contained in the <em>content-page.php<\/em> file.\u00a0It does it with\u00a0this line:<\/p>\n<div class=\"gist\" data-gist=\"8058f344a2ac3e9c0b05f213f0308e9e\" data-gist-file=\"get-template-part-page\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/8058f344a2ac3e9c0b05f213f0308e9e.js?file=get-template-part-page\">Loading gist 8058f344a2ac3e9c0b05f213f0308e9e<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>That <code>get_template_part()<\/code> function fetches the contents of the template part and runs them at this point in the template file, just as if the code was coded into this file.<\/p>\n<p>Before we move on to looking at the contents of that template part in detail, take some time to open some other template files\u00a0in the theme. Each of them references the relevant template part, with a few exceptions:<\/p>\n<ul>\n<li><em>404.php<\/em> doesn&#8217;t include a WordPress Loop because if a user lands on a 404 page there won&#8217;t be any data to fetch and output.<\/li>\n<li><em>archive.php <\/em>and<em> index.php<\/em> fetch the template part for the relevant post format, using the post format taxonomy. This means that you can write a template part\u00a0for each post format, with the code needed to output posts of different formats. If these files don&#8217;t exist it will fall back to <em>content.php<\/em>.<\/li>\n<li><em>image.php<\/em> doesn&#8217;t fetch a template part \u2013 instead the loop is coded within the template file.<\/li>\n<li><em>page.php<\/em> fetches the <em>content-page.php<\/em> template part.<\/li>\n<li><em>search.php<\/em> fetches the <em>content-search.php<\/em> template part.<\/li>\n<li><em>single.php<\/em> fetches the <em>content-single.php<\/em> template part.<\/li>\n<\/ul>\n\n<h2 id=\"loop-dissected\">The WordPress Loop Dissected<\/h2>\n<p>Let&#8217;s move on to take a closer look at the WordPress Loop. As we&#8217;ve already been working with <em>page.php<\/em>, let&#8217;s examine the <em>content-page.php<\/em> file. Open that in your code editor.<\/p>\n<p><em>Note: If you&#8217;re writing a theme, you can choose to use template parts for your loop or code it directly into the template files. Using a term,plate part will make your theme more efficient but you may find that the theme you&#8217;re using just has the loop coded into the template\u00a0file. Both will work.<\/em><\/p>\n<p>Here&#8217;s the code in <em>content-page.php<\/em>:<\/p>\n<div class=\"gist\" data-gist=\"f308f6fe43211eb7f522d20f6c1371c8\" data-gist-file=\"content-page-php\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/f308f6fe43211eb7f522d20f6c1371c8.js?file=content-page-php\">Loading gist f308f6fe43211eb7f522d20f6c1371c8<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Let&#8217;s step through each section of this one at a time.<\/p>\n<h3>Opening the Element and Displaying a Header<\/h3>\n<p>First, the file opens an <code>article<\/code> element and outputs the post title inside a <code>header<\/code> element:<\/p>\n<div class=\"gist\" data-gist=\"0b802d9bdec93a3d236b6e9e36eb8b99\" data-gist-file=\"contain-page-part-1\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/0b802d9bdec93a3d236b6e9e36eb8b99.js?file=contain-page-part-1\">Loading gist 0b802d9bdec93a3d236b6e9e36eb8b99<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>The <code>article<\/code> element has an ID that uses the <a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/the_ID\" target=\"_blank\"><code>the_ID()<\/code><\/a> template tag to fetch the ID of the post, and a class that&#8217;s defined using the <a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/post_class\" target=\"_blank\"><code>post_class()<\/code><\/a> template tag. This gives it a class that includes the ID of the post, the post type, taxonomies and more.<\/p>\n<p>A <code>header<\/code> element is then opened, which includes the post title using the <a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/the_title\" target=\"_blank\"><code>the_title()<\/code><\/a> template tag. This has parameters for\u00a0the markup that precedes and follows the post title &#8211; so it&#8217;s contained in a <code>h1<\/code> element with the <code>entry-title<\/code> class.<\/p>\n<p>The <code>header<\/code> element is then closed.<\/p>\n<h3>Displaying Metadata<\/h3>\n<p>The next step is to display\u00a0any metadata. In this theme, there isn&#8217;t much of this &#8211; just the post thumbnail. This is displayed using\u00a0the\u00a0<code>twentysixteen_post_thumbnail()<\/code> function, which is\u00a0specific to this theme. If you want to find out how this function works, take a look in the theme&#8217;s <em>functions.php<\/em> file &#8211; in the current version this function is defined from line 398.<\/p>\n<p>In some themes, more metadata will be output here, such as any custom fields, author information and more. If you want to add this to your own themes, check out our tutorial on <a href=\"https:\/\/wpmudev.com\/blog\/wordpress-development-intermediate-users-custom-fields-metadata\/\" target=\"_blank\">working with metadata<\/a>.<\/p>\n<h3>Outputting\u00a0the Post Content<\/h3>\n<p>Now the WordPress Loop will output\u00a0the post&#8217;s content, with\u00a0these lines:<\/p>\n<div class=\"gist\" data-gist=\"eb5854b52978a6e83e0a06ce255e2b3d\" data-gist-file=\"content-page-part-2\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/eb5854b52978a6e83e0a06ce255e2b3d.js?file=content-page-part-2\">Loading gist eb5854b52978a6e83e0a06ce255e2b3d<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Let&#8217;s take a look at what this does.<\/p>\n<ol>\n<li>Firstly, it opens a div with the entry-content class.<\/li>\n<li>Then it uses the <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/the_content\/\" target=\"_blank\"><code>the_content()<\/code><\/a> template tag to fetch the content for the database and display it.<\/li>\n<li>It uses the <a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/wp_link_pages\" target=\"_blank\"><code>wp_link_pages()<\/code><\/a>\u00a0template tag to display links to earlier and\u00a0later posts for paginated posts. In this template part this won&#8217;t do anything as pages aren&#8217;t paginated, but in a single post it&#8217;ll display a link to the previous and next posts.<\/li>\n<li>It closes the<code> entry-content<\/code> div.<\/li>\n<\/ol>\n<p>In some template files or template parts the content won&#8217;t be output, but the excerpt will instead. If you have a loop in your <em>archive.php<\/em> file you&#8217;ll probably choose to use <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/the_excerpt\/\" target=\"_blank\"><code>the_excerpt()<\/code><\/a> instead of <code>the_content()<\/code> to output the excerpt instead.<\/p>\n<h3>Finishing Things Off<\/h3>\n<p>The twenty sixteen theme then has a link that a logged\u00a0user with the relevant user role can click on to edit the post:<\/p>\n<div class=\"gist\" data-gist=\"8ef10b2beafdd9087d3ddafca57a60cb\" data-gist-file=\"content-page-part-3\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/8ef10b2beafdd9087d3ddafca57a60cb.js?file=content-page-part-3\">Loading gist 8ef10b2beafdd9087d3ddafca57a60cb<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>This uses the <a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/edit_post_link\" target=\"_blank\"><code>edit_post_link()<\/code><\/a> function with a few parameters that define exactly\u00a0what&#8217;s output.<\/p>\n<p>In some themes you&#8217;ll find that more metadata is output here.<\/p>\n<p>Finally, the <code>article<\/code> element that contains everything is closed.<\/p>\n<h2 id=\"customizing-loops\">Customizing the WordPress Loop<\/h2>\n<p>So that&#8217;s the standard WordPress Loop. This will automatically fetch the appropriate content\u00a0from the database, depending on what page is being viewed, and output it. It&#8217;s incredibly efficient, because the same code is used to display lots of different types of content, from posts to pages and other post types, as well as archives for\u00a0posts, categories, authors and more.<\/p>\n<p>If you don&#8217;t want the WordPress Loop to work in the standard way for each type of content, you can amend it. Or if you want to output a completely different loop (or an extra loop) on a page, you can do so. Let&#8217;s take a quick look at how you might do this.<\/p>\n<h3>Amending the Main Loop<\/h3>\n<p>Before you think about writing your own loop, try amending the main loop instead. This is much more efficient because you&#8217;re still using that main query that&#8217;s running on each page.<\/p>\n<p>To do this, you write e function that you attach to the <code>pre_get_posts<\/code> hook. Inside this function you use a conditional tag to define when the query will be amended and some code to tell WordPress exactly how to amend it.<\/p>\n<p>Let&#8217;s take a look at an example. The main blog page only includes posts of the <em>post<\/em> post type: it won&#8217;t show any of your custom post types. If you want to amend this to display a\u00a0custom post type on your home page as well, you can.<\/p>\n<p>Let&#8217;s say your custom post type is registered as <em>myposttype<\/em>. Here&#8217;s the function you would add to your theme&#8217;s <em>functions.php<\/em> file to add these to the main blog page:<\/p>\n<div class=\"gist\" data-gist=\"8e6885d969b07357f508189691d02658\" data-gist-file=\"pre-post\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/8e6885d969b07357f508189691d02658.js?file=pre-post\">Loading gist 8e6885d969b07357f508189691d02658<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>This checks that we&#8217;re on the main blog page with <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/is_home\/\" target=\"_blank\"><code>is_home()<\/code><\/a>, that we&#8217;re not in the admin screens with <code>!is_admin()<\/code> and that the main query is running with\u00a0<code>$query-&gt;is_main_query()<\/code>. If all of these are the case, then it defines which two post types are output in the loop using\u00a0<code>$query-&gt;set('post_type', array( 'post', 'myposttype' ) )<\/code>.<\/p>\n<h3>Writing a New Loop<\/h3>\n<p>If you want to display content on a page that wouldn&#8217;t be fetched by the main loop, or you want to run multiple loops on one page, then you can write your own new query and loop to do this.<\/p>\n<p>There are three methods for doing this:<\/p>\n<ul>\n<li>Use the <a href=\"https:\/\/codex.wordpress.org\/Template_Tags\/get_posts\" target=\"_blank\"><code>get_posts()<\/code><\/a> function to fetch and output posts, with your own parameters for the number of posts, the taxonomy terms or anything else you want to focus own.<\/li>\n<li>Use the <a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/get_pages\" target=\"_blank\"><code>get_pages()<\/code><\/a> function to do the same for pages.<\/li>\n<li>Use the <a href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/\" target=\"_blank\">WP_Query<\/a> class to fetch and output absolutely anything you want. This is an extremely flexible and useful class that you can use wherever you want in your theme.<\/li>\n<\/ul>\n<p>For guidance on using each of these, see our <a href=\"https:\/\/wpmudev.com\/blog\/creating-custom-queries-wordpress\/\" target=\"_blank\">guide to writing custom queries<\/a>.<\/p>\n<h2>Understanding the WordPress Loop will Help You Create Better WordPress Themes<\/h2>\n<p>Hopefully, you&#8217;ve now got a better understanding of the WordPress loop and how it works.<\/p>\n<p>Knowing what the WordPress Loop consists of will help you to make more sense of the code in the themes that you use on your site. It&#8217;s also essential if you&#8217;re going to write your own themes: it&#8217;s much better to understand the WordPress Loop and write your own than it is to just copy one from elsewhere. This will make your theme do exactly what you need it to do with no wasted code, improving efficiency.<\/p>\n<p>It&#8217;s a crucial part of any theme and now you understand it, that will significantly boost your theme-building skills.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The WordPress loop is big. It&#8217;s huge. It&#8217;s critical. Without it, your WordPress site won&#8217;t work. By this, I don&#8217;t mean that it&#8217;s large. In fact, it should be as lean, tight and quick as possible. But it&#8217;s a major part of what makes WordPress, well, WordPress. Without it you can&#8217;t query the database and [&hellip;]<\/p>\n","protected":false},"author":347011,"featured_media":160856,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[263],"tags":[9770,10571],"tutorials_categories":[],"class_list":["post-160740","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-development-2","tag-wordpress-loop"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/160740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/347011"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=160740"}],"version-history":[{"count":18,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/160740\/revisions"}],"predecessor-version":[{"id":209626,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/160740\/revisions\/209626"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/160856"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=160740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=160740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=160740"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=160740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}