{"id":8457,"date":"2012-01-01T08:30:02","date_gmt":"2011-12-31T23:30:02","guid":{"rendered":"http:\/\/www.sssg.org\/blogs\/hiro345\/?p=8457"},"modified":"2011-12-28T08:58:07","modified_gmt":"2011-12-27T23:58:07","slug":"%e3%81%93%e3%82%8c%e3%81%a7%e7%90%86%e8%a7%a3%e3%81%a7%e3%81%8d%e3%82%8b%ef%bc%81-wordpress-%e3%83%99%e3%83%bc%e3%82%b9%e3%83%86%e3%83%bc%e3%83%9e","status":"publish","type":"post","link":"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/8457.html","title":{"rendered":"\u3053\u308c\u3067\u7406\u89e3\u3067\u304d\u308b\uff01 WordPress \u30d9\u30fc\u30b9\u30c6\u30fc\u30de"},"content":{"rendered":"<p>\u4e3b\u306b\u5b66\u7fd2\u7528\u3001\u78ba\u8a8d\u7528\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u3068\u3001WordPress \u30d9\u30fc\u30b9\u30c6\u30fc\u30de\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n<!--more--><br \/>\n\u57fa\u672c\u7684\u306a\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3057\u304b\u7528\u610f\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u5b9f\u7528\u6027\u306f\u4f4e\u3044\u306e\u3067\u3059\u304c\u3001\u4e16\u306e\u4e2d\u306e\u30c6\u30fc\u30de\u3092\u898b\u3066\u7406\u89e3\u3057\u305f\u308a\u3001\u3061\u3087\u3063\u3068\u3057\u305f\u4fee\u6b63\u30b3\u30fc\u30c9\u3092\u57cb\u3081\u8fbc\u3093\u3067\u52d5\u4f5c\u78ba\u8a8d\u3092\u3057\u305f\u3044\u3068\u304d\u306b\u3001\u3053\u3046\u3044\u3063\u305f\u30d9\u30fc\u30b9\u30c6\u30fc\u30de\u304c\u3042\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002\u6642\u9593\u304c\u3042\u308b\u3068\u304d\u306b\u3001\u3061\u3087\u3053\u3061\u3087\u3053\u3068\u6a5f\u80fd\u8ffd\u52a0\u3092\u3057\u3066\u3044\u3053\u3046\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong>404.php<\/strong><br \/>\n404.php \u306f\u30da\u30fc\u30b8\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u6642\u306b\u4f7f\u308f\u308c\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3059\u3002<\/p>\n<pre class=\"brush: php; gutter: true\">\r\n&lt;?php get_header(); ?&gt;\r\n  &lt;article&gt;\r\n    &lt;header&quot;&gt;\r\n      &lt;h1&gt;404&lt;\/h1&gt;\r\n    &lt;\/header&gt;\r\n    &lt;div class=&quot;entry-content&quot;&gt;\r\n      &lt;p&gt;not found.&lt;\/p&gt;\r\n      &lt;?php get_search_form(); ?&gt;\r\n    &lt;\/div&gt;&lt;!-- .entry-content --&gt;\r\n  &lt;\/article&gt;\r\n&lt;?php get_sidebar(); ?&gt;\r\n&lt;?php get_footer(); ?&gt;\r\n<\/pre>\n<p><strong>category.php<\/strong><br \/>\ncategory.php \u306f\u30ab\u30c6\u30b4\u30ea\u30da\u30fc\u30b8\u7528\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3059\u3002<\/p>\n<pre class=\"brush: php; gutter: true\">\r\n&lt;?php get_header(); ?&gt;\r\n&lt;?php if (have_posts()) {\r\n  while (have_posts()) {\r\n    the_post();\r\n?&gt;\r\n  &lt;?php the_ID(); ?&gt; \u2026 &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;br \/&gt;\r\n&lt;?php\r\n  } \/* endwhile *\/\r\n} \/* endif *\/\r\n?&gt;\r\n&lt;?php get_sidebar(); ?&gt;\r\n&lt;?php get_footer(); ?&gt;\r\n<\/pre>\n<p><strong>footer.php<\/strong><br \/>\nfooter.php \u306f\u30d5\u30c3\u30bf\u30fc\u7528\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3059\u3002get_footer\u3067\u547c\u3073\u51fa\u305b\u307e\u3059\u3002<\/p>\n<pre class=\"brush: php; gutter: true\">\r\n&lt;\/div&gt;&lt;!-- #content --&gt;\r\n&lt;footer&gt;\r\n  &lt;div&gt;\r\n    &lt;a href=&quot;&lt;?php echo esc_url(&#039;http:\/\/wordpress.org\/&#039;); ?&gt;&quot;&gt;&lt;?php printf(&#039;Powered by WordPress&#039;); ?&gt;&lt;\/a&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/footer&gt;\r\n&lt;\/div&gt;&lt;!-- #page --&gt;\r\n&lt;?php wp_footer(); ?&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p><strong>functions.php<\/strong><br \/>\n\u3053\u3053\u3067\u306f\u3001functions.php \u306b\u30c6\u30fc\u30de\u3067\u30a6\u30a3\u30b8\u30c3\u30c8\u5bfe\u5fdc\u306e\u30b5\u30a4\u30c9\u30d0\u30fc\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u8a18\u8ff0\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: php; gutter: true\">\r\n&lt;?php\r\nif ( function_exists(&#039;register_sidebar&#039;) ) {\r\n    register_sidebar();\r\n}\r\n?&gt;\r\n<\/pre>\n<p><strong>header.php<\/strong><br \/>\nheader.php \u306f\u3001\u30d8\u30c3\u30c0\u30fc\u90e8\u5206\u7528\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3001get_header\u3067\u547c\u3073\u51fa\u305b\u307e\u3059\u3002<\/p>\n<pre class=\"brush: php; gutter: true\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html &lt;?php language_attributes(); ?&gt;&gt;\r\n&lt;head&gt;\r\n  &lt;meta charset=&quot;&lt;?php bloginfo( &#039;charset&#039; ); ?&gt;&quot; \/&gt;\r\n  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot; \/&gt;\r\n  &lt;title&gt;&lt;?php wp_title( &#039;|&#039;, true, &#039;right&#039; ); bloginfo( &#039;name&#039; ); ?&gt;&lt;\/title&gt;\r\n  &lt;link rel=&quot;stylesheet&quot; type=&quot;text\/css&quot; media=&quot;all&quot; href=&quot;&lt;?php bloginfo( &#039;stylesheet_url&#039; ); ?&gt;&quot; \/&gt;\r\n  &lt;?php wp_head(); ?&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div id=&quot;page&quot;&gt;\r\n  &lt;header id=&quot;banner&quot;&gt;\r\n  &lt;\/header&gt;\r\n  &lt;div id=&quot;content&quot;&gt;\r\n<\/pre>\n<p><strong>index.php<\/strong><br \/>\nindex.php \u306f\u30e1\u30a4\u30f3\u30da\u30fc\u30b8\u7528\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3059\u3002<\/p>\n<pre class=\"brush: php; gutter: true\">\r\n&lt;?php get_header(); ?&gt;\r\n \r\n&lt;!-- \u8a18\u4e8b\u4e00\u89a7 --&gt;\r\n&lt;section&gt;\r\n&lt;h1&gt;\u8a18\u4e8b\u4e00\u89a7&lt;\/h1&gt;\r\n&lt;?php while ( have_posts() ) { the_post(); ?&gt;\r\n  &lt;article&gt;\r\n    &lt;?php get_template_part( &#039;loop&#039;, &#039;simple&#039; ); ?&gt;\r\n  &lt;\/article&gt;\r\n&lt;?php } ?&gt;\r\n&lt;\/section&gt;\r\n \r\n&lt;!-- \u30ab\u30c6\u30b4\u30ea\u4e00\u89a7 --&gt;\r\n&lt;section&gt;\r\n&lt;h1&gt;\u30ab\u30c6\u30b4\u30ea\u4e00\u89a7&lt;\/h1&gt;\r\n&lt;ul&gt;\r\n    &lt;?php wp_list_categories(&#039;orderby=name&amp;title_li=&#039;); ?&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/section&gt;\r\n \r\n&lt;!-- \u30da\u30fc\u30b8\u4e00\u89a7 --&gt;\r\n&lt;section&gt;\r\n&lt;h1&gt;\u30da\u30fc\u30b8\u4e00\u89a7&lt;\/h1&gt;\r\n&lt;ul&gt;\r\n    &lt;?php wp_list_pages(&#039;sort_column=menu_order&amp;title_li=&#039;); ?&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/section&gt;\r\n \r\n&lt;?php get_sidebar(); ?&gt;\r\n&lt;?php get_footer(); ?&gt;\r\n<\/pre>\n<p><strong>license.txt<\/strong><br \/>\nlicense.txt \u306f\u30e9\u30a4\u30bb\u30f3\u30b9\u3092\u8a18\u8f09\u3057\u305f\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002<\/p>\n<pre class=\"brush: php; gutter: true\">\r\nLicense: The Open Software License 3.0\r\nLicense URI: http:\/\/www.opensource.org\/licenses\/OSL-3.0\r\n<\/pre>\n<p><strong>loop-simple.php<\/strong><br \/>\nloop-simple.php \u306f\u3001\u7e70\u308a\u8fd4\u3057\u7528\u306b\u4ed6\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u3089\u547c\u3073\u51fa\u3057\u3066\u4f7f\u3046\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3059\u3002get_template_part\u3092\u4f7f\u3063\u3066\u547c\u3073\u51fa\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: php; gutter: true\">\r\n&lt;?php the_ID(); ?&gt; \u2026 &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;br \/&gt;\r\n<\/pre>\n<p><strong>page.php<\/strong><br \/>\npage.php \u306f\u56fa\u5b9a\u30da\u30fc\u30b8\u7528\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3059\u3002<\/p>\n<pre class=\"brush: php; gutter: true\">\r\n&lt;?php get_header(); ?&gt;\r\n&lt;div id=&quot;content-page&quot;&gt;\r\n&lt;?php while ( have_posts() ) {\r\n   the_post();\r\n?&gt;\r\n &lt;?php the_ID(); ?&gt; \u2026 &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;br \/&gt;\r\n&lt;?php } \/* endwhile *\/ ?&gt;\r\n&lt;\/div&gt;&lt;!-- #content-page --&gt;\r\n&lt;?php get_sidebar(); ?&gt;\r\n&lt;?php get_footer(); ?&gt;\r\n<\/pre>\n<p><strong>sidebar.php<\/strong><br \/>\nsidebar.php \u306f\u30b5\u30a4\u30c9\u30d0\u30fc\u7528\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3059\u3002get_sidebar\u3067\u547c\u3073\u51fa\u305b\u307e\u3059\u3002<\/p>\n<pre class=\"brush: php; gutter: true\">\r\n&lt;ul id=&quot;sidebar&quot;&gt;\r\n&lt;?php if ( !function_exists(&#039;dynamic_sidebar&#039;) || !dynamic_sidebar() ) { ?&gt;\r\n &lt;li id=&quot;about&quot;&gt;\r\n  &lt;h2&gt;About&lt;\/h2&gt;\r\n  &lt;p&gt;simple blog&lt;\/p&gt;\r\n &lt;\/li&gt;\r\n &lt;li id=&quot;license&quot;&gt;\r\n  &lt;h2&gt;License&lt;\/h2&gt;\r\n  &lt;ul&gt;\r\n   &lt;li&gt;&lt;a href=&quot;http:\/\/www.opensource.org\/licenses\/OSL-3.0&quot;&gt;The Open Software License 3.0&lt;\/a&gt;&lt;\/li&gt;\r\n  &lt;\/ul&gt;\r\n &lt;\/li&gt;\r\n&lt;?php } \/* endif *\/ ?&gt;\r\n&lt;\/ul&gt;\r\n<\/pre>\n<p><strong>single.php<\/strong><br \/>\nsingle.php \u306f\u5358\u4e00\u8a18\u4e8b\u7528\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3059\u3002<\/p>\n<pre class=\"brush: php; gutter: true\">\r\n&lt;?php get_header(); ?&gt;\r\n&lt;?php while ( have_posts() ) {\r\n  the_post(); ?&gt;\r\n  &lt;nav&gt;\r\n    &lt;span class=&quot;nav-previous&quot;&gt;&lt;?php previous_post_link(&#039;%link&#039;, &#039;&amp;lt;&#039;); ?&gt;&lt;\/span&gt;\r\n    &lt;span class=&quot;nav-next&quot;&gt;&lt;?php next_post_link(&#039;%link&#039;, &#039;&amp;gt;&#039;); ?&gt;&lt;\/span&gt;\r\n  &lt;\/nav&gt;\r\n  &lt;?php the_ID(); ?&gt; \u2026 &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;br \/&gt;\r\n  &lt;?php the_content(); ?&gt;\r\n&lt;?php } \/* endwhile *\/ ?&gt;\r\n&lt;?php get_footer(); ?&gt;\r\n<\/pre>\n<p><strong>style.css<\/strong><br \/>\nstyle.css\u3067\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3092\u30ea\u30bb\u30c3\u30c8\u3057\u3066\u3001\u30dc\u30fc\u30c0\u30fc\u3092\u3059\u3079\u3066\u306e\u8981\u7d20\u306b\u3064\u3051\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u308c\u306b\u3088\u308a\u3001\u3069\u306e\u8981\u7d20\u306b\u5bfe\u3057\u3066\u3001\u3069\u306e\u3088\u3046\u306bCSS\u304c\u9069\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u304c\u308f\u304b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: css; gutter: true\">\r\n@charset &quot;utf-8&quot;;\r\n\/*\r\nTheme Name: Simple\r\nTheme URI: https:\/\/www.hiro345.net\/blogs\/hiro345\/\r\nDescription: \u30b7\u30f3\u30d7\u30eb\u306a\u30c6\u30fc\u30de\u3002\r\nAuthor: hiro345\r\nVersion: 1.0\r\nLicense: The Open Software License 3.0\r\nLicense URI: http:\/\/www.opensource.org\/licenses\/OSL-3.0\r\n*\/\r\n \r\n\/* reset *\/\r\n * {\r\n margin: 0;\r\n padding: 0;\r\n font-size: 100%;\r\n border: 1px solid #ccc;\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3b\u306b\u5b66\u7fd2\u7528\u3001\u78ba\u8a8d\u7528\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u3068\u3001WordPress \u30d9\u30fc\u30b9\u30c6\u30fc\u30de\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[1209,295,70],"class_list":["post-8457","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux","tag-php","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/8457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/comments?post=8457"}],"version-history":[{"count":12,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/8457\/revisions"}],"predecessor-version":[{"id":8517,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/8457\/revisions\/8517"}],"wp:attachment":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/media?parent=8457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/categories?post=8457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/tags?post=8457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}