I added the following code (sitepoint.com old suggestion dated 2013) then it shows and enabled in admin setting, but the tags doesn’t show up on page.
// 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’);
Please help how to correct the code. I am using wordpress v4.5.2
I do not want to use plugin because most of them are out date and don’t want to see if they are out of business.
Glad to know the code works functionality to the pages. This is my first time to try add tag on pages. The tags always display on post. Don’t know if it is possible to display on page to make sure it is functioning.