{"id":59169,"date":"2016-05-23T15:14:24","date_gmt":"2016-05-23T14:14:24","guid":{"rendered":"https:\/\/pl.wordpress.org\/support\/topic\/szablon-typu-one-page\/"},"modified":"2016-08-05T22:17:45","modified_gmt":"2016-08-05T22:17:45","slug":"szablon-typu-one-page","status":"publish","type":"topic","link":"https:\/\/pl.wordpress.org\/support\/topic\/szablon-typu-one-page\/","title":{"rendered":"Szablon typu one-page"},"content":{"rendered":"<p>Cze\u015b\u0107!<br \/>\nPr\u00f3buj\u0119 stworzy\u0107 szablon na WordPressie typu one-page. I teraz kolejno struktura mojego projektu wygl\u0105da tak:<\/p>\n<p>&#8211; header.php<br \/>\n&#8211; front-page.php<br \/>\n&#8211; posts-theme.php<br \/>\n&#8211; all-theme.php<br \/>\n&#8211; contact-theme.php<br \/>\n&#8211; footer.php<\/p>\n<p>Plik header to ca\u0142a sekcja &lt;head&gt; i menu znajduj\u0105ce si\u0119 na g\u00f3rze strony, footer.php trzyma stopk\u0119 czyli &#8222;ko\u0144czy&#8221; stron\u0119, front-page.php to strona g\u0142\u00f3wna, kt\u00f3ra wy\u015bwietla wszystkie kolejno header.php, post+all+contact-theme.php i na ko\u0144cu footer.php. Te trzy strony *-theme.php nie includuj\u0105 headera ani stopki.<\/p>\n<p>M\u00f3j plik front-page.php wygl\u0105da tak:<\/p>\n<pre><code>&lt;?php get_header();\n$include = get_pages();\n$content = apply_filters(&#039;the_content&#039;,$include[0]-&gt;post_content);\necho $content;\nget_footer(); ?&gt;<\/code><\/pre>\n<p>I teraz pytanie &#8211; jak przerobi\u0107 ten kod z front-page.php \u017ceby pokazywa\u0142 mi wszystkie strony jakie s\u0105 dodane na jednym z tych szablon\u00f3w? Istotne jest te\u017c \u017ceby wy\u015bwietla\u0142y mi nie tre\u015b\u0107 wpisan\u0105 przy tworzeniu strony, ale ca\u0142y kod HTML\/PHP, kt\u00f3ry tam jest.<\/p>\n","protected":false},"template":"","class_list":["post-59169","topic","type-topic","status-publish","hentry","topic-tag-include","topic-tag-onepage","topic-tag-szablon"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/59169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/59169\/revisions"}],"wp:attachment":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=59169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}