{"id":73785,"date":"2012-03-10T11:00:34","date_gmt":"2012-03-10T16:00:34","guid":{"rendered":"http:\/\/wpmu.org\/?p=73785"},"modified":"2012-03-09T19:15:23","modified_gmt":"2012-03-10T00:15:23","slug":"how-to-show-wordpress-pages-on-your-homepage","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/how-to-show-wordpress-pages-on-your-homepage\/","title":{"rendered":"How to Show WordPress Pages on Your Homepage"},"content":{"rendered":"<p><a rel=\"lightbox[73785]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/how-to-show-wordpress-pages-on-your-homepage\/data-big\/\" rel=\"attachment wp-att-73786\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-73786\" title=\"data-big\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/03\/data-big.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"629\" height=\"316\" \/><\/a><br \/>\nIf you ever wanted your Pages to show up in the stream of Posts on your homepage, then it\u2019s easily done. Just add the following code to your functions.php file. (Appearance &gt; Editor &gt; Theme Functions \u2013 functions.php)<\/p>\n<pre>add_filter( 'pre_get_posts', 'my_get_posts' );\r\n function my_get_posts( $query ) {\r\n if ( is_home() &amp;&amp; false == $query-&gt;query_vars['suppress_filters'] )\r\n $query-&gt;set( 'post_type', array( 'post', 'page') );\r\n return $query;\r\n }<\/pre>\n<p>&nbsp;<\/p>\n<p>Or, if you prefer, you could make your own simple little plugin to do this in two minutes. <a href=\"https:\/\/wpmudev.com\/blog\/wordpress-plugin-development-guide\/\" target=\"_blank\">See this post for instructions.<\/a><\/p>\n<h2><strong>Why Would You Want to Do This?<\/strong><\/h2>\n<p>The question naturally arises \u2013 why would you want to make Pages act like Posts? Well, there\u2019s no telling. People bend and twist and hammer WordPress in all sorts of ways for their purposes. But it\u2019s important to remember that this doesn\u2019t stop Pages from being Pages. It simply publishes them to the stream on the homepage when you first create them. Some, especially those who primarily or exclusively use Pages on their sites instead of Posts, may want that.<\/p>\n<p>Photo: <a href=\"http:\/\/www.bigstockphoto.com\/image-481945\/stock-photo-information-super-highway\" target=\"_blank\">Information Super Highway<\/a> from BigStock<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This trick lets you publish Pages to the stream on your homepage as you do Posts.<\/p>\n","protected":false},"author":84404,"featured_media":73787,"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":[4],"tags":[655],"tutorials_categories":[],"class_list":["post-73785","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-plugins","tag-pages"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/73785","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\/84404"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=73785"}],"version-history":[{"count":1,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/73785\/revisions"}],"predecessor-version":[{"id":198554,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/73785\/revisions\/198554"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/73787"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=73785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=73785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=73785"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=73785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}