Community Forums › Forums › Archived Forums › Design Tips and Tricks › Post Tags and Categories for Pages
Tagged: categories, tags
- This topic has 3 replies, 2 voices, and was last updated 7 years, 11 months ago by
marcoELE.
-
AuthorPosts
-
March 2, 2018 at 10:01 am #217222
marcoELE
ParticipantDear friends,
I have installed the 'Post Tags and Categories for Pages' plugin. In order to be able to add tags and categories for pages, like we do for entries.
Now, I would like to display categories and tags in the tag pages and some meta tags (date, comment link), like it happens with the entries tags.
Here you are one example of what i need: this is a tag page, the second entry comes from a page and not from a entry, but the meta tags, tags and categories are not shown.
[ https://marcoele.com/palabraclave/nivel-umbral/ ]
I would like to display the meta info only into this type of tag pages, and not into the single pages. Is this possible? 🙂
Thank you very much
https://marcoele.com/palabraclave/nivel-umbral/
JuanMarch 2, 2018 at 7:40 pm #217233Brad Dalton
ParticipantYes but we don't support 3rd party plugins unless there're Genesis. Only Genesis child themes.
You can either find a plugin which does what you want or custom code from a tutorial which enables you to add tags to pages.
March 5, 2018 at 5:30 pm #217334marcoELE
ParticipantDear friends,
Thank you very much for the answer, but I am not asking for support 3rd party plugins.
I already know how to add tags (or categories) to pages (via plugin or via code into the functions.php file) but i dont know how to display them to my template files for pages.
I would like to know the code that enables display the meta info:
1. Into the 'tag' pages [like this one https://marcoele.com/palabraclave/nivel-umbral/ ] The second item comes from a page already tagged, but the problem is that doesnt display the tags.
2. Into the normal single pages that i already have tagged.
(only to display. The code wich enables to add tags i alredy know it, see below)Is there any code to add into my functions.php file that enables what I need?
Thank you very much
juan..........................................
// add tag support to pages
function tags_support_all() {
register_taxonomy_for_object_type('post_tag', 'page');
}// ensure all tags are included in queries
function tags_support_query($wp_query) {
if ($wp_query->get('tag')) $wp_query->set('post_type', 'any');
}// tag hooks
add_action('init', 'tags_support_all');
add_action('pre_get_posts', 'tags_support_query');
..........................................March 6, 2018 at 6:10 am #217348marcoELE
ParticipantThank you very much for the answer, but I am not asking for support 3rd party plugins.
I just need to show tags and categories in pages. Plugin is working already ok and they proposed me to ask to my theme developer for what I need.
Thank you very much
juan -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.