{"id":176,"date":"2024-03-24T18:20:24","date_gmt":"2024-03-24T10:20:24","guid":{"rendered":"http:\/\/47.108.179.73\/?p=176"},"modified":"2024-03-24T21:09:37","modified_gmt":"2024-03-24T13:09:37","slug":"%e6%96%b0%e5%bb%ba%e5%bd%92%e6%a1%a3%e9%a1%b5%e9%9d%a2","status":"publish","type":"post","link":"https:\/\/loyeh.top\/index.php\/2024\/03\/24\/%e6%96%b0%e5%bb%ba%e5%bd%92%e6%a1%a3%e9%a1%b5%e9%9d%a2\/","title":{"rendered":"\u4fee\u6539\u65f6\u8f74\u9875\u9762"},"content":{"rendered":"\n<h2 class=\"wp-block-heading has-text-align-center\">\u6548\u679c<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading has-text-align-center\">\u5b9e\u73b0<\/h2>\n\n\n\n<p>timeline.php\u539f\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php \n\/*Template Name: \u5f52\u6863\u65f6\u95f4\u8f74*\/\n?>\n\n&lt;?php get_header(); ?>\n\n&lt;div class=\"page-information-card-container\">&lt;\/div>\n\n&lt;?php get_sidebar(); ?>\n\n&lt;div id=\"primary\" class=\"content-area\">\n\t&lt;main id=\"main\" class=\"site-main\" role=\"main\">\n\t\t&lt;?php\n\t\t\twhile ( have_posts() ) :\n\t\t\t\tthe_post();\n\n\t\t\t\tget_template_part( 'template-parts\/content', 'timeline' );\n\n\t\t\t\tif (get_option(\"argon_show_sharebtn\") != 'false') {\n\t\t\t\t\tget_template_part( 'template-parts\/share' );\n\t\t\t\t}\n\n\t\t\t\tif (comments_open() || get_comments_number()) {\n\t\t\t\t\tcomments_template();\n\t\t\t\t}\n\t\t\tendwhile;\n\t\t?>\n\n&lt;?php get_footer(); ?><\/code><\/pre>\n\n\n\n<p>\u5c06timeline.php\u4fee\u6539\u4e3a\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/*\nTemplate Name: \u65f6\u95f4\u8f74\n*\/\nget_header(); ?&gt;\n&lt;?php get_sidebar(); ?&gt;\n\t\t\n&lt;div id=\"primary\" class=\"content-area\"&gt;\n\t&lt;main id=\"main\" class=\"site-main\" role=\"main\"&gt;\n\t\t&lt;article class=\"post post-full card bg-white shadow-sm border-0\" id=\"post-&lt;?php the_ID(); ?&gt;\" &lt;?php post_class(); ?&gt;&gt;\n\t\t\t&lt;a class=\"post-title text-center\" href=\"&lt;?php the_permalink(); ?&gt;\"&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;\n\t\t\t&lt;div class=\"post-content\" id=\"post_content\"&gt;\n                &lt;?php\n                $previous_year = $year = 0;\n                $previous_month = $month = 0;\n                $ul_open = false;\n                $myposts = get_posts('numberposts=-1&amp;orderby=post_date&amp;order=DESC');\n                foreach ($myposts as $post) :\n                    setup_postdata($post);\n                    $year = mysql2date('Y', $post-&gt;post_date);\n                    $month = mysql2date('n', $post-&gt;post_date);\n                    $day = mysql2date('j', $post-&gt;post_date);\n                    if ($year != $previous_year) :\n                        if ($ul_open) echo '&lt;\/div&gt;';\n                        echo '&lt;h3&gt;' . get_the_time('Y') . '&lt;\/h3&gt;';\n                        echo \"&lt;div class='argon-timeline'&gt;\";\n                        $ul_open = true;\n                    endif;\n                    $previous_year = $year;\n                    $previous_month = $month;\n                    ?&gt;\n                    &lt;div class='argon-timeline-node'&gt;\n                        &lt;div class='argon-timeline-time'&gt;&lt;?php the_time('m-d'); ?&gt;&lt;\/div&gt;\n\t\t\t\t\t\t\t\t\t&lt;div class='argon-timeline-card card bg-gradient-secondary shadow-sm'&gt;&lt;div class='argon-timeline-title'&gt;&lt;a href=\"&lt;?php the_permalink(); ?&gt;\"&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/div&gt;&lt;\/div&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/div&gt;\n                &lt;?php\n                endforeach;\n                echo '&lt;\/div&gt;';\n                ?&gt;\n\t\t\t&lt;\/div&gt;\n\t\t&lt;\/article&gt;\n\t\t\n&lt;style&gt;\n\t.argon-timeline-card {\n\t\tmargin-bottom: 4px;\n\t\tpadding: 4px 20px;\n\t\tdisplay: inline-block;\n\t}\n\t.argon-timeline-title {\n\t\tfont-size: 17px;\n\t\tfont-weight: bold;\n\t\tmargin-bottom: 0px;\n\t}\n\t.post-content {\n\t\tline-height:1;\n\t}\n\t.argon-timeline-card:before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tleft: -18px;\n\t\ttop: 8px;\n\t\tbackground: var(--themecolor);\n\t\twidth: 10px;\n\t\theight: 10px;\n\t\tborder-radius: 50%;\n\t}\n\t.argon-timeline-time {\n    position: absolute;\n    left: -110px;\n    margin-top: 0px;\n    width: 85px;\n    text-align: right;\n    font-size: 15px;\n    line-height: 26px;\n\t}\n\t.argon-timeline {\n    margin-left: 110px;\n    border-left: 3px solid rgba(var(--themecolor-rgbstr),0.2);\n    padding-left: 10px;\n    position: relative;\n    padding-top: 10px;\n    padding-bottom: 10px;\n\t}\n&lt;\/style&gt;\n&lt;?php\nwhile ( have_posts() ) :\n\tthe_post();\t\t\n\tif (get_option(\"argon_show_sharebtn\") != 'false') {\n\t\tget_template_part( 'template-parts\/share' );\n\t}\n\tif (comments_open() || get_comments_number()) {\n\t\tcomments_template();\n\t}\nendwhile;\n?&gt;\n&lt;?php get_footer(); ?&gt;\n\t\t\n\t&lt;\/main&gt;\n&lt;\/div&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-text-align-center\">\u53c2\u8003<\/h2>\n\n\n\n<p><a href=\"https:\/\/crowya.com\/681\" target=\"_blank\"  rel=\"nofollow\" >Argon \u4e3b\u9898\u4fee\u6539\u8bb0\u5f55 - \u9e26\u9e26\u7684\u5de2\u7a74 (crowya.com)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6548\u679c \u5b9e\u73b0 timeline.php\u539f\u4ee3\u7801\uff1a \u5c06timeline.php\u4fee\u6539\u4e3a\u4ee5\u4e0b\u4ee3\u7801\uff1a \u53c2\u8003 Argon \u4e3b\u9898\u4fee\u6539\u8bb0\u5f55 &#8211; \u9e26\u9e26 &#823","protected":false},"author":1,"featured_media":168,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-176","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-other"],"jetpack_featured_media_url":"https:\/\/loyeh.top\/wp-content\/uploads\/2024\/03\/1pmqd3-scaled.jpg","_links":{"self":[{"href":"https:\/\/loyeh.top\/index.php\/wp-json\/wp\/v2\/posts\/176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/loyeh.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/loyeh.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/loyeh.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/loyeh.top\/index.php\/wp-json\/wp\/v2\/comments?post=176"}],"version-history":[{"count":3,"href":"https:\/\/loyeh.top\/index.php\/wp-json\/wp\/v2\/posts\/176\/revisions"}],"predecessor-version":[{"id":180,"href":"https:\/\/loyeh.top\/index.php\/wp-json\/wp\/v2\/posts\/176\/revisions\/180"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/loyeh.top\/index.php\/wp-json\/wp\/v2\/media\/168"}],"wp:attachment":[{"href":"https:\/\/loyeh.top\/index.php\/wp-json\/wp\/v2\/media?parent=176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/loyeh.top\/index.php\/wp-json\/wp\/v2\/categories?post=176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/loyeh.top\/index.php\/wp-json\/wp\/v2\/tags?post=176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}