{"id":1339967,"date":"2010-01-11T18:35:59","date_gmt":"2010-01-11T18:35:59","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/static-home-page-issues\/"},"modified":"2016-08-19T15:16:01","modified_gmt":"2016-08-19T15:16:01","slug":"static-home-page-issues","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/static-home-page-issues\/","title":{"rendered":"Static home page issues"},"content":{"rendered":"<p>I created a page to use as a static homepage based on a template. In it I have added code to show posts below the static content. I can see the page fine if I go to it directly <\/p>\n<p>(here: <a href=\"http:\/\/thewillowfarm.com\/wordpressTEST\/home-2\/\">http:\/\/thewillowfarm.com\/wordpressTEST\/home-2<\/a>) <\/p>\n<p>but it won&#8217;t display as the actual Home page that the &#8220;Home&#8221; link in the nav bar links to.<\/p>\n<p><a href=\"http:\/\/thewillowfarm.com\/wordpressTEST\/\">http:\/\/thewillowfarm.com\/wordpressTEST\/<\/a><\/p>\n<p>Perhaps I over thought this approach, but would love to get it working.<\/p>\n<p>Here&#8217;s the code for the template:<\/p>\n<pre><code>&lt;?php\n\/*\n * Template Name: home\n *\/\n?&gt;\n&lt;?php\n\nget_header(); ?&gt;\n\n\t&lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;\n\n&lt;!-- PAGE --&gt;\n\t\t&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;\n\t\t&lt;div class=&quot;post&quot; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;\n                &lt;?php breadcrumb_trail(); ?&gt;\n\t\t&lt;h2&gt;\n                  &lt;?php\n                      if (function_exists(&#039;ghpseo_output&#039;))\n                             ghpseo_output(&#039;secondary_title&#039;);\n                      else the_title();\n                  ?&gt;\n                &lt;\/h2&gt;\n\t\t\t&lt;div class=&quot;entry&quot;&gt;\n\t\t\t\t&lt;?php the_content(&#039;&lt;p class=&quot;serif&quot;&gt;Read the rest of this page &amp;raquo;&lt;\/p&gt;&#039;); ?&gt;\n\n\t\t\t\t&lt;?php wp_link_pages(array(&#039;before&#039; =&gt; &#039;&lt;p&gt;&lt;strong&gt;Pages:&lt;\/strong&gt; &#039;, &#039;after&#039; =&gt; &#039;&lt;\/p&gt;&#039;, &#039;next_or_number&#039; =&gt; &#039;number&#039;)); ?&gt;\n\n\t\t\t&lt;\/div&gt;\n\t\t&lt;\/div&gt;\n\t\t&lt;?php endwhile; endif; ?&gt;\n\t&lt;?php edit_post_link(&#039;Edit this entry.&#039;, &#039;&lt;p&gt;&#039;, &#039;&lt;\/p&gt;&#039;); ?&gt;\n&lt;!-- END PAGE --&gt;\n\n&lt;!-- POSTS --&gt;\n&lt;h1 id=&quot;whatsNew&quot;&gt;What&#039;s New at The Willow Farm&lt;\/h1&gt;\n\n\t&lt;?php $temp_query = $wp_query; ?&gt;\n\t&lt;?php query_posts(&quot;showposts=2&quot;); ?&gt;  \n\n\t&lt;?php while (have_posts()) : the_post(); ?&gt;\n\t\t\t&lt;div &lt;?php post_class() ?&gt; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;\n\t\t\t\t&lt;h2&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title_attribute(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h2&gt;\n\t\t\t\t&lt;small&gt;&lt;?php the_time(&#039;F jS, Y&#039;) ?&gt; &lt;!-- by &lt;?php the_author() ?&gt; --&gt;&lt;\/small&gt;\n\n\t\t\t\t&lt;div class=&quot;entry&quot;&gt;\n\t\t\t\t\t&lt;?php the_content(&#039;Read the rest of this entry &amp;raquo;&#039;); ?&gt;\n\t\t\t\t&lt;\/div&gt;\n\n\t\t\t\t&lt;p class=&quot;postmetadata&quot;&gt;&lt;?php the_tags(&#039;Tags: &#039;, &#039;, &#039;, &#039;&lt;br \/&gt;&#039;); ?&gt; Posted in &lt;?php the_category(&#039;, &#039;) ?&gt; | &lt;?php edit_post_link(&#039;Edit&#039;, &#039;&#039;, &#039; | &#039;); ?&gt;  &lt;?php comments_popup_link(&#039;No Comments &#187;&#039;, &#039;1 Comment &#187;&#039;, &#039;% Comments &#187;&#039;); ?&gt;&lt;\/p&gt;\n\t\t\t&lt;\/div&gt;\n\t&lt;?php endwhile; ?&gt;\n&lt;!-- END POSTS --&gt;\n\n\t&lt;\/div&gt;&lt;!-- END Content div --&gt;\n\n&lt;?php get_sidebar(); ?&gt;\n\n&lt;?php get_footer(); ?&gt;<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-1339967","topic","type-topic","status-closed","hentry","topic-tag-static-home-page"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1339967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1339967\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=1339967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}