Generatepress主题文章目录默认是在文章的尾端,如果想让Generatepress主题的文章目录显示在标题下面,在主题的functions.php文件中添加以下代码:
add_filter( 'generate_header_entry_meta_items', function() {
return array(
'author',
'date',
'categories',
'tags',
);
} );
add_filter( 'generate_footer_entry_meta_items', function( $items ) {
return array_diff( $items, [ 'categories', 'tags' ] );
} );
然后自定义CSS中添加:
.entry-header .cat-links:before,
.entry-header .tags-links:before {
display: inline-block; /* adds icons */
}
样式可以在自定义CSS中自由定义。