• Skip to main content
  • Bỏ qua footer

Tim Toi .Net

Blog chia sẻ kiến thức liên quan đến công nghệ

  • Home
  • Web Development
    • WordPress
    • Domain – Hosting
  • SEO
  • MMO
  • Blog

Đinh Tuấn / Tháng Một 23, 2018

Cách chuyển tiêu đề và Info bài viết từ sang một bên ảnh đại diện trong Genesis

Tớ sẽ hướng dẫn các bạn cách chuyển Post Title và Post Info từ Entry Header sang Entry Content trong theme Genesis

Để dễ hình dung các bạn xem qua 2 ảnh trước và sau khi áp dụng

Trước:

post-title-info-in-entry-header

Sau khi áp dụng code:

post-title-info-in-entry-content
Thêm đoạn code sau vào file function.php trong thư mục child theme

//* Move Post Title and Post Info from inside Entry Header to Entry Content on Posts page
add_action( 'genesis_before_entry', 'reposition_entry_header' );
function reposition_entry_header() {
 
	if ( is_home() ) {
 
		remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
		remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
		remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
		remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
 
		add_action( 'genesis_entry_content', 'genesis_do_post_title', 9 );
		add_action( 'genesis_entry_content', 'genesis_post_info', 9 );
 
	}
 
}

Các bạn có thể thêm đoạn code ngắn sau vào file style.css trong child theme để sửa cho phù hợp vs blog của bạn

.entry-content .entry-title a {
	border-bottom: none;

	color: #333;
}
 
.entry-content .entry-title a:hover {
	color: #666;
}
 
.entry-content .entry-meta a {
	color: #666;
}
 
.entry-content .entry-meta a:hover {
	color: #333;
}
Sending
User Review
0(0 votes)

Thuộc chủ đề:Web Development, WordpressTag với:Customize theme genesis, Genesis

Reader Interactions

Trả lời Hủy

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Footer

Chính sách bảo mật
Liên hệ
Giới thiệu

Giới thiệu

Tìm Tòi là 1 blog cá nhân chuyên viết về Web Hosting, WordPress, SEO, MMO ...v.v và những gì mình quan tâm và muốn chia sẻ.

Kết nối

  • Email
  • Facebook
  • Phone
  • YouTube

Copyright © 2021 TimToi.Net All rights reserved · Đăng nhập