{"id":651004,"date":"2025-07-27T00:34:36","date_gmt":"2025-07-26T16:34:36","guid":{"rendered":"http:\/\/puo.cn\/?p=651004"},"modified":"2025-08-07T20:01:14","modified_gmt":"2025-08-07T12:01:14","slug":"wordpress-dux%e4%b8%bb%e9%a2%98%e5%a2%9e%e5%8a%a0%e8%af%b4%e8%af%b4-%e5%be%ae%e8%af%ad%e5%8d%95%e9%a1%b5","status":"publish","type":"post","link":"http:\/\/puo.cn\/?p=651004","title":{"rendered":"WordPress DUX\u4e3b\u9898\u589e\u52a0\u8bf4\u8bf4\/\u5fae\u8bed\u5355\u9875"},"content":{"rendered":"<h4 id=\"title-1\">\u6559\u7a0b<\/h4>\n<p>\u672c\u6559\u7a0b\u6765\u81ea\u7edc\uff0c\u9996\u5148\u5728\u4e3b\u9898\u7684functions.php\u91cc\u9762\u52a0\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\/\/\u8bf4\u8bf4<br \/>\nadd_action(&#8216;init&#8217;, &#8216;my_custom_init&#8217;); function my_custom_init() { $labels = array( &#8216;name&#8217; =&gt; &#8216;\u8bf4\u8bf4&#8217;, &#8216;singular_name&#8217; =&gt; &#8216;singularname&#8217;, &#8216;add_new&#8217; =&gt; &#8216;\u53d1\u8868\u8bf4\u8bf4&#8217;, &#8216;add_new_item&#8217; =&gt; &#8216;\u53d1\u8868\u8bf4\u8bf4&#8217;, &#8216;edit_item&#8217; =&gt; &#8216;\u7f16\u8f91\u8bf4\u8bf4&#8217;, &#8216;new_item&#8217; =&gt; &#8216;\u65b0\u8bf4\u8bf4&#8217;, &#8216;view_item&#8217; =&gt; &#8216;\u67e5\u770b\u8bf4\u8bf4&#8217;, &#8216;search_items&#8217; =&gt; &#8216;\u641c\u7d22\u8bf4\u8bf4&#8217;, &#8216;not_found&#8217; =&gt; &#8216;\u6682\u65e0\u8bf4\u8bf4&#8217;, &#8216;not_found_in_trash&#8217; =&gt; &#8216;\u6ca1\u6709\u5df2\u9057\u5f03\u7684\u8bf4\u8bf4&#8217;, &#8216;parent_item_colon&#8217; =&gt; &#8221;, &#8216;menu_name&#8217; =&gt; &#8216;\u8bf4\u8bf4&#8217; ); $args = array( &#8216;labels&#8217; =&gt; $labels, &#8216;public&#8217; =&gt; true, &#8216;publicly_queryable&#8217; =&gt; true, &#8216;show_ui&#8217; =&gt; true, &#8216;show_in_menu&#8217; =&gt; true, &#8216;query_var&#8217; =&gt; true, &#8216;rewrite&#8217; =&gt; true, &#8216;capability_type&#8217; =&gt; &#8216;post&#8217;, &#8216;has_archive&#8217; =&gt; true, &#8216;hierarchical&#8217; =&gt; false, &#8216;menu_position&#8217; =&gt; null, &#8216;supports&#8217; =&gt; array(&#8216;title&#8217;,&#8217;editor&#8217;,&#8217;author&#8217;) ); register_post_type(&#8216;shuoshuo&#8217;,$args); }<\/p>\n<p>&nbsp;<\/p>\n<p>\u7136\u540e\u65b0\u5efa\u4e00\u4e2ashuoshuo.php\u6587\u4ef6\u653e\u5230\u4f60\u6b63\u5728\u4f7f\u7528\u7684\u4e3b\u9898\u6839\u76ee\u5f55\u91cc\u628a\u4e0b\u9762\u4ee3\u7801\u653e\u5165shuoshuo.php;<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;?php \/*<br \/>\nTemplate Name: \u8bf4\u8bf4<br \/>\nauthor: snow<br \/>\nurl: https:\/\/www.snowing.ltd\/shuoshuo<br \/>\n*\/<br \/>\nget_header(); ?&gt;<br \/>\n&lt;section class=&#8221;container container-page&#8221;&gt;<\/p>\n<p>&lt;style type=&#8221;text\/css&#8221;&gt;<br \/>\n#shuoshuo_content {<br \/>\nbackground-color: #fff;<br \/>\npadding: 10px;<br \/>\nmin-height: 500px;<br \/>\n}<br \/>\n\/* shuo *\/<br \/>\nbody.theme-dark .cbp_tmtimeline::before {<br \/>\nbackground: RGBA(255, 255, 255, 0.06);<br \/>\n}<br \/>\nul.cbp_tmtimeline {<br \/>\npadding: 0;<br \/>\n}<br \/>\ndiv class.cdp_tmlabel &gt; li .cbp_tmlabel {<br \/>\nmargin-bottom: 0;<br \/>\n}<br \/>\n.cbp_tmtimeline {<br \/>\nmargin: 30px 0 0 0;<br \/>\npadding: 0;<br \/>\nlist-style: none;<br \/>\nposition: relative;<br \/>\n}<br \/>\n\/* The line *\/<br \/>\n.cbp_tmtimeline:before {<br \/>\ncontent: &#8221;;<br \/>\nposition: absolute;<br \/>\ntop: 0;<br \/>\nbottom: 0;<br \/>\nwidth: 4px;<br \/>\nbackground: RGBA(0, 0, 0, 0.02);<br \/>\nleft: 80px;<br \/>\nmargin-left: 10px;<br \/>\n}<br \/>\n\/* The date\/time *\/<br \/>\n.cbp_tmtimeline &gt; li .cbp_tmtime {<br \/>\ndisplay: block;<br \/>\n\/* width: 29%; *\/<br \/>\n\/* padding-right: 110px; *\/<br \/>\nmax-width: 70px;<br \/>\nposition: absolute;<br \/>\n}<br \/>\n.cbp_tmtimeline &gt; li .cbp_tmtime span {<br \/>\ndisplay: block;<br \/>\ntext-align: right;<br \/>\n}<br \/>\n.cbp_tmtimeline &gt; li .cbp_tmtime span:first-child {<br \/>\nfont-size: 0.9em;<br \/>\ncolor: #bdd0db;<br \/>\n}<br \/>\n.cbp_tmtimeline &gt; li .cbp_tmtime span:last-child {<br \/>\nfont-size: 1.2em;<br \/>\ncolor: #9BCD9B;<br \/>\n}<br \/>\n.cbp_tmtimeline &gt; li:nth-child(odd) .cbp_tmtime span:last-child {<br \/>\ncolor: RGBA(255, 125, 73, 0.75);<br \/>\n}<br \/>\ndiv.cbp_tmlabel &gt; p {<br \/>\nmargin-bottom: 0;<br \/>\n}<br \/>\n\/* Right content *\/<br \/>\n.cbp_tmtimeline &gt; li .cbp_tmlabel {<br \/>\nmargin: 0 0 45px 65px;<br \/>\nbackground: #9BCD9B;<br \/>\ncolor: #fff;<br \/>\npadding: .8em 1.2em .4em 1.2em;<br \/>\n\/* font-size: 1.2em; *\/<br \/>\nfont-weight: 300;<br \/>\nline-height: 1.4;<br \/>\nposition: relative;<br \/>\nborder-radius: 5px;<br \/>\ntransition: all 0.3s ease 0s;<br \/>\nbox-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);<br \/>\ncursor: pointer;<br \/>\ndisplay: block;<br \/>\n}<br \/>\n.cbp_tmlabel:hover {<br \/>\n\/* transform:scale(1.05); *\/<br \/>\ntransform: translateY(-3px);<br \/>\nz-index: 1;<br \/>\n-webkit-box-shadow: 0 15px 32px rgba(0, 0, 0, 0.15) !important<br \/>\n}<br \/>\n.cbp_tmtimeline &gt; li:nth-child(odd) .cbp_tmlabel {<br \/>\nbackground: RGBA(255, 125, 73, 0.75);<br \/>\n}<br \/>\n\/* The triangle *\/<br \/>\n.cbp_tmtimeline &gt; li .cbp_tmlabel:after {<br \/>\nright: 100%;<br \/>\nborder: solid transparent;<br \/>\ncontent: &#8221; &#8220;;<br \/>\nheight: 0;<br \/>\nwidth: 0;<br \/>\nposition: absolute;<br \/>\npointer-events: none;<br \/>\nborder-right-color: #9BCD9B;<br \/>\nborder-width: 10px;<br \/>\ntop: 4px;<br \/>\n}<br \/>\n.cbp_tmtimeline &gt; li:nth-child(odd) .cbp_tmlabel:after {<br \/>\nborder-right-color: RGBA(255, 125, 73, 0.75);<br \/>\n}<br \/>\np.shuoshuo_time {<br \/>\nmargin-top: 10px;<br \/>\nborder-top: 1px dashed #fff;<br \/>\npadding-top: 5px;<br \/>\n}<br \/>\n\/* Media *\/<br \/>\n@media screen and (max-width: 65.375em) {<br \/>\n.cbp_tmtimeline &gt; li .cbp_tmtime span:last-child {<br \/>\nfont-size: 1.2em;<br \/>\n}<br \/>\n}<br \/>\n.shuoshuo_author_img img {<br \/>\nborder: 1px solid #ddd;<br \/>\npadding: 2px;<br \/>\nfloat: left;<br \/>\nborder-radius: 64px;<br \/>\ntransition: all 1.0s;<br \/>\n}<br \/>\n.avatar {<br \/>\n-webkit-border-radius: 100% !important;<br \/>\n-moz-border-radius: 100% !important;<br \/>\nbox-shadow: inset 0 -1px 0 #3333sf;<br \/>\n-webkit-box-shadow: inset 0 -1px 0 #3333sf;<br \/>\n-webkit-transition: 0.4s;<br \/>\n-webkit-transition: -webkit-transform 0.4s ease-out;<br \/>\ntransition: transform 0.4s ease-out;<br \/>\n-moz-transition: -moz-transform 0.4s ease-out;<br \/>\n}<br \/>\n.zhuan {<br \/>\ntransform: rotateZ(720deg);<br \/>\n-webkit-transform: rotateZ(720deg);<br \/>\n-moz-transform: rotateZ(720deg);<br \/>\n}<br \/>\n\/* end *\/<br \/>\n&lt;\/style&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;div id=&#8221;primary&#8221; class=&#8221;content-area&#8221; style=&#8221;&#8221;&gt;<br \/>\n&lt;main id=&#8221;main&#8221; class=&#8221;site-main&#8221; role=&#8221;main&#8221;&gt;<br \/>\n&lt;div id=&#8221;shuoshuo_content&#8221;&gt;<br \/>\n&lt;ul class=&#8221;cbp_tmtimeline&#8221;&gt;<br \/>\n&lt;?php query_posts(&#8220;post_type=shuoshuo&amp;post_status=publish&amp;posts_per_page=-1&#8243;);if (have_posts()) : while (have_posts()) : the_post(); ?&gt;<br \/>\n&lt;li&gt; &lt;span class=&#8221;shuoshuo_author_img&#8221;&gt;&lt;img src=&#8221;http:\/\/https:\/\/img.snowing.ltd\/2018\/10\/snow.jpg&#8221; class=&#8221;avatar avatar-48&#8243; width=&#8221;48&#8243; height=&#8221;48&#8243;&gt;&lt;\/span&gt;<br \/>\n&lt;a class=&#8221;cbp_tmlabel&#8221; href=&#8221;javascript:void(0)&#8221;&gt;<br \/>\n&lt;p&gt;&lt;\/p&gt;<br \/>\n&lt;p&gt;&lt;?php the_content(); ?&gt;&lt;\/p&gt;<br \/>\n&lt;p&gt;&lt;\/p&gt;<br \/>\n&lt;p class=&#8221;shuoshuo_time&#8221;&gt;&lt;i class=&#8221;fa fa-clock-o&#8221;&gt;&lt;\/i&gt;<br \/>\n&lt;?php the_time(&#8216;Y-n-j G:i&#8217;); ?&gt;<br \/>\n&lt;\/p&gt;<br \/>\n&lt;\/a&gt;<br \/>\n&lt;?php endwhile;endif; ?&gt;<br \/>\n&lt;\/li&gt;<br \/>\n&lt;\/ul&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;\/main&gt;<br \/>\n&lt;!&#8211; .site-main &#8211;&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;script type=&#8221;text\/javascript&#8221;&gt;<br \/>\n$(function () {<br \/>\nvar oldClass = &#8220;&#8221;;<br \/>\nvar Obj = &#8220;&#8221;;<br \/>\n$(&#8220;.cbp_tmtimeline li&#8221;).hover(function () {<br \/>\nObj = $(this).children(&#8220;.shuoshuo_author_img&#8221;);<br \/>\nObj = Obj.children(&#8220;img&#8221;);<br \/>\noldClass = Obj.attr(&#8220;class&#8221;);<br \/>\nvar newClass = oldClass + &#8221; zhuan&#8221;;<br \/>\nObj.attr(&#8220;class&#8221;, newClass);<br \/>\n}, function () {<br \/>\nObj.attr(&#8220;class&#8221;, oldClass);<br \/>\n})<br \/>\n})<br \/>\n&lt;\/script&gt;<\/p>\n<p>&lt;?php _moloader(&#8216;mo_pagemenu&#8217;, false) ?&gt;<br \/>\n&lt;?php while (have_posts()) : the_post(); ?&gt;<br \/>\n&lt;?php wp_link_pages(&#8216;link_before=&lt;span&gt;&amp;link_after=&lt;\/span&gt;&amp;before=&lt;div class=&#8221;article-paging&#8221;&gt;&amp;after=&lt;\/div&gt;&amp;next_or_number=number&#8217;); ?&gt;<br \/>\n&lt;?php endwhile; ?&gt;<br \/>\n&lt;p&gt;\u00a0&lt;\/p&gt;<br \/>\n&lt;?php comments_template(&#8221;, true); ?&gt;<\/p>\n<p>&lt;?php get_footer(); ?&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6559\u7a0b \u672c\u6559\u7a0b\u6765\u81ea\u7edc\uff0c\u9996\u5148\u5728\u4e3b\u9898\u7684functions.php\u91cc\u9762\u52a0\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a &nbsp; &nbsp; \/\/\u8bf4\u8bf4 add_action(&#8216;init&#8217;, &#8216;my_custom_init&#8217;); &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[140],"tags":[31,340],"topic":[342,415],"class_list":["post-651004","post","type-post","status-publish","format-standard","hentry","category-domain-website","tag-wordpress","tag-340","topic-wordpress","topic-code"],"_links":{"self":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/651004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=651004"}],"version-history":[{"count":1,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/651004\/revisions"}],"predecessor-version":[{"id":651005,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/651004\/revisions\/651005"}],"wp:attachment":[{"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=651004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=651004"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=651004"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftopic&post=651004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}