---
title: "Gộp chung post info và post meta trong Genesis Framework"
author: "Trung Hiếu"
date: "2014-12-15"
lastmod: "2022-06-19"
url: "https://wpcanban.com/wordpress/thu-thuat-wordpress/gop-chung-post-info-va-post-meta-trong-genesis-framework.html"
---

# Gộp chung post info và post meta trong Genesis Framework

Gộp chung post info và post meta trong Genesis Framework.

![gop-chung-post-info-va-post-meta-trong-genesis](https://wpcanban.com/wp-content/uploads/2014/12/gop-chung-post-info-va-post-meta-trong-genesis.png)

Hôm qua, một bạn tên là *Nam* có comment hỏi tôi về cách gộp chung *post info* (thời gian đăng tải bài viết, tác giả, số bình luận,…) và *post meta* (chuyên mục, tags) trong [Genesis](https://wpcanban.com/tag/thu-thuat-genesis/) Framework (hay Genesis child themes) thành một hàng. Nhân đây, tôi sẽ giới thiệu cho các bạn 2 cách đơn giản để làm điều này. Cách thứ nhất là sử dụng plugin [Genesis Simple Edits](https://wordpress.org/plugins/genesis-simple-edits/), cách thứ hai là sử dụng code snippets. Nếu bạn quan tâm thì hãy dành vài phút để xem qua bài viết nhé. :P

1. Sử dụng Genesis Simple Edits

[Genesis Simple Edits](https://wordpress.org/plugins/genesis-simple-edits/) thực sự là một plugin tuyệt vời giúp các bạn có thể nhanh chóng tùy biến post info, post meta và footer theo ý của mình. Sau khi cài đặt và kích hoạt, các bạn hãy truy cập vào *Genesis* => *Simple Edits*. Theo mặc định, post info và post meta trong Genesis sẽ có cấu trúc như hình bên dưới:

![chinh-sua-post-info-va-post-meta-trong-genesis](https://wpcanban.com/wp-content/uploads/2014/12/chinh-sua-post-info-va-post-meta-trong-genesis.png)

Để gộp chung chúng lại với nhau, các bạn hãy “cut” shortcode từ mục *Entry Meta (below content)* và “paste” vào mục *Entry Meta (above content)* hoặc ngược lại:

![gop-chung-post-info-va-post-meta-trong-genesis-3](https://wpcanban.com/wp-content/uploads/2014/12/gop-chung-post-info-va-post-meta-trong-genesis-3.png)

Và đây là kết quả:

![gop-chung-post-info-va-post-meta-trong-genesis-2](https://wpcanban.com/wp-content/uploads/2014/12/gop-chung-post-info-va-post-meta-trong-genesis-2.png)

Ngoài ra, các bạn cũng có thể tùy biến post info và post meta theo nhiều cách khác nhau bằng cách sử dụng các shortcode được liệt kê trong danh sách *Shortcode Reference*.

2. Sử dụng code snippets

Nếu không muốn sử dụng plugin, các bạn có thể chèn 2 đoạn code sau đây vào file *functions.php* của Genesis child themes.

Code 1:

```
//* Remove the entry header
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
```

Code 2:

```
//* Customize the entry meta in the entry footer
add_filter( 'genesis_post_meta', 'post_meta_filter' );
function post_meta_filter( $post_meta ) {
$post_meta = 'Posted on [post_date] by [post_author_posts_link] under [post_categories before=""] with tag [post_tags before=""][post_edit]';
return $post_meta;
}
```

Và sau đó tùy biến CSS sao cho phù hợp. Xong. Đơn giản vậy thôi. Chúc các bạn thành công. :)

*Nếu bạn thích bài viết này, hãy subscribe blog của tôi để thường xuyên cập nhật những bài viết hay nhất, mới nhất qua email nhé. Cảm ơn rất nhiều. :)*
