- This topic has 1 reply, 2 voices, and was last updated 5 years, 7 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › All Other Themes › SKT-Magazine Pro – Keywords/Tags on Pages
Hello, i have buy the SKT-Magazine Pro and one Question. How i can use Keywords/Tags on a static Page? With a Plugin or with a code in functions.php?
I have found this Code in an other Forum. Can i use this Code in function.php?
// 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');
Hi,
Yes, you can use it in functions.php file.
Regards,
Brad
Today, consumers all around the world are looking to reduce their ecological footprint. That is why they buy products that do not disrupt the environment. […]
Do you want to dig into the easiest ways to add a WordPress privacy policy page and terms and conditions page in your site? If […]
The 21st century has definitely been marked by major changes in many fields, including business. And while breathing amidst 2019, we can see that this […]