✏️ 正在编辑: blog-content-4.php
路径:
/home/h359620/public_html/wp-content/themes/datis/template-parts/blog/content/blog-content-4.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php if (! defined('ABSPATH')) { exit; } $terms = get_the_terms(get_the_ID(), 'category'); $category_name = ''; $category_link = ''; if (! is_wp_error($terms) && ! empty($terms)) { $primary_term = $terms[0]; $category_name = $primary_term->name; $category_link = get_term_link($primary_term); } if (empty($category_name)) { $category_name = esc_html__('Category', 'datis'); } $comments_number = get_comments_number(); $comments_label = sprintf( _n('%s Comments', '%s Comment', $comments_number, 'datis'), number_format_i18n($comments_number) ); ?> <div class="datis-blog-card style-4 m-0 p-3"> <div class="wrapper d-flex flex-row gap-3"> <a href="<?php the_permalink(); ?>" class="blog-thumbnail"> <?php if (has_post_thumbnail()) : the_post_thumbnail(); else : ?> <img src="https://placehold.co/70x120" alt="<?php the_title(); ?>"> <?php endif; ?> </a> <div class="content-wrapper d-flex flex-column gap-2"> <div class="post-meta"> <div class="categories d-flex flex-row justify-content-between align-items-center gap-2"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M15.0002 8.33325L10.8335 8.33325" stroke="#090625" stroke-opacity="0.5" stroke-width="1.25" stroke-linecap="round" /> <path d="M8.3335 2.5H13.7502C14.1372 2.5 14.3307 2.5 14.4931 2.52139C15.615 2.66908 16.4978 3.55185 16.6454 4.67369C16.6668 4.83614 16.6668 5.02965 16.6668 5.41667" stroke="#090625" stroke-opacity="0.5" stroke-width="1.25" /> <path d="M18.3332 9.83167C18.3332 7.63803 18.3332 6.54121 17.692 5.82828C17.633 5.7627 17.5706 5.70029 17.505 5.6413C16.792 5.00008 15.6952 5.00008 13.5016 5.00008H13.1902C12.2288 5.00008 11.7481 5.00008 11.3001 4.8724C11.0541 4.80225 10.8169 4.70401 10.5933 4.5796C10.1862 4.35314 9.84632 4.01323 9.16651 3.33342L8.70796 2.87487C8.48011 2.64702 8.36618 2.53309 8.24646 2.43384C7.73028 2.00594 7.09705 1.74365 6.42948 1.68123C6.27464 1.66675 6.11353 1.66675 5.79129 1.66675C5.05585 1.66675 4.68813 1.66675 4.38183 1.72454C3.03343 1.97895 1.9787 3.03367 1.7243 4.38207C1.6665 4.68837 1.6665 5.0561 1.6665 5.79154M18.3259 13.3334C18.296 15.3997 18.1428 16.5712 17.3569 17.3571C16.3806 18.3334 14.8092 18.3334 11.6665 18.3334H8.33317C5.19047 18.3334 3.61913 18.3334 2.64282 17.3571C1.6665 16.3808 1.6665 14.8094 1.6665 11.6668V9.16675" stroke="#090625" stroke-opacity="0.5" stroke-width="1.25" stroke-linecap="round" /> </svg> <div class="cat"> <?php if ($category_link && ! is_wp_error($category_link)) : ?> <a href="<?php echo esc_url($category_link); ?>"> <?php echo esc_html($category_name); ?> </a> <?php else : ?> <span><?php echo esc_html($category_name); ?></span> <?php endif; ?> </div> </div> <div class="comments d-flex flex-row align-items-center gap-1"> <span class="comments-icon"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11.6667 5.89188C10.6861 5.32465 9.54762 5 8.33333 5C4.65143 5 1.66666 7.98477 1.66666 11.6667C1.66666 12.7331 1.91707 13.7411 2.3623 14.635C2.48062 14.8725 2.52 15.144 2.45141 15.4004L2.05434 16.8844C1.88197 17.5287 2.47134 18.118 3.11556 17.9457L4.59959 17.5486C4.85595 17.48 5.12747 17.5194 5.36502 17.6377C6.25891 18.0829 7.26688 18.3333 8.33333 18.3333C12.0152 18.3333 15 15.3486 15 11.6667C15 10.4524 14.6754 9.31391 14.1081 8.33333" stroke="#090625" stroke-opacity="0.5" stroke-width="1.25" stroke-linecap="round" /> <path d="M14.9998 12.0849C15.0552 12.0618 15.1102 12.0379 15.1646 12.013C15.4664 11.8752 15.8049 11.8236 16.1254 11.9093L16.522 12.0155C17.3273 12.231 18.064 11.4942 17.8486 10.689L17.7424 10.2923C17.6567 9.97181 17.7082 9.63326 17.8461 9.33152C18.1589 8.64674 18.3332 7.88543 18.3332 7.08342C18.3332 6.02168 18.0277 5.03129 17.4998 4.19534M7.9165 4.99642C8.73369 3.0409 10.6646 1.66675 12.9165 1.66675C13.9904 1.66675 14.9913 1.97925 15.8332 2.51826" stroke="#090625" stroke-opacity="0.5" stroke-width="1.25" stroke-linecap="round" /> <path d="M5.43182 11.6667H5.43932M8.34075 11.6667H8.34825M11.2499 11.6667H11.2574" stroke="#090625" stroke-opacity="0.5" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round" /> </svg> </span> <span class="comments-label"> <?php echo esc_html($comments_label); ?> </span> </div> </div> <div class="blog-card-text"> <h3 class="blog-title"> <a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a> </h3> </div> </div> </div> </div>
💾 保存文件
← 返回文件管理器