admin管理员组文章数量:1323225
I have found a way to have the ‘category’ the page is recorded against to display at the top of the ‘page’ (this is not a post but a WordPress ‘page’).
I would also like to display the ‘tags’ that have been recorded against this page but haven’t been able to find a way to achieve this – all the search results talk about are ‘removing tags from posts’ or getting ‘pages of tags’. These results make my ability to select the correct Google search to get my answer frustrating!
To get the category of the page to show I added the following to my ‘functions.php’ in my child theme directory:
add_filter('twentytwenty_show_categories_in_entry_header', '__return_true');
Is there an equivalent piece of code I can use to display the tags assigned to this page also?
Many thanks for all help provided,
Richard
I have found a way to have the ‘category’ the page is recorded against to display at the top of the ‘page’ (this is not a post but a WordPress ‘page’).
I would also like to display the ‘tags’ that have been recorded against this page but haven’t been able to find a way to achieve this – all the search results talk about are ‘removing tags from posts’ or getting ‘pages of tags’. These results make my ability to select the correct Google search to get my answer frustrating!
To get the category of the page to show I added the following to my ‘functions.php’ in my child theme directory:
add_filter('twentytwenty_show_categories_in_entry_header', '__return_true');
Is there an equivalent piece of code I can use to display the tags assigned to this page also?
Many thanks for all help provided,
Richard
Share Improve this question asked Oct 4, 2020 at 8:16 AvocationAvocation 11 Answer
Reset to default 1enter your tags instead of the specified ones or delete the extra ones:
function wps_display_custom_tags ($post_meta) {
// delete meta tags you do not want to display
return array( 'author', 'post-date', 'comments', 'sticky', 'tags');
}
add_filter('twentytwenty_post_meta_location_single_top', 'wps_display_custom_tags');
本文标签: How to show 39tags39 in 39Wordpress Pages39 not Posts
版权声明:本文标题:How to show 'tags' in 'Wordpress Pages' [not Posts] 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742083042a2419810.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论