Thêm đoạn code sau vào file functions.php
add_filter('comment_form_defaults', 'custom_reply_title'); function custom_reply_title($defaults) { $defaults['title_reply_before'] = '<span id="reply-title" class="h4 comment-reply-title">'; $defaults['title_reply_after'] = '</span>'; return $defaults; }
Xóa trong file comments.php theme flatsome
<p class="h3 comments-title uppercase"> <?php printf( // WPCS: XSS OK. esc_html( _nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', 'flatsome' ) ), number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' ); ?> </p>
Thêm ngày cập nhật cuối cùng
function add_update_date_page(){ ?> <div class=""single-share-wrap""> <div> <span>Cập nhật lúc: <?php echo get_the_modified_date('H:i:s - d/m/Y') ?></span> </div> <?php echo do_shortcode( '[ share ]' ); ?> </div> <?php } add_filter( 'flatsome_after_page_content', 'add_update_date_page' );
.single-share-wrap{ display: flex; justify-content: space-between; align-items: center; background: #f8f8f8; padding: 10px; border-radius: 5px; margin: 20px 0; } .single-share-wrap a{ margin-bottom: 0; } .single .entry-meta{ margin-bottom: 20px; }
Thêm breadcumbs flatsome rankmath
add_action('flatsome_after_header', 'add_rankmath_breadcrumbs'); function add_rankmath_breadcrumbs(){ if (function_exists('rank_math_the_breadcrumbs') && ! is_front_page()){ ?> <section class="site-breadcrumb"> <div class="container"> <?php rank_math_the_breadcrumbs(); ?> </div> </section> <?php } }
.site-breadcrumb { background-color: #ecf0f9; -webkit-box-shadow: 0 2px 4px rgba(0,0,0,.05); box-shadow: 0 2px 4px rgba(0,0,0,.05); padding: 10px 0; font-size: 14px; text-transform: capitalize } .site-breadcrumb p { margin: 0; font-size: 14px } .site-breadcrumb a { color: #1177b7; font-size: 14px }