This repository has been archived on 2024-01-12. You can view files and clone it, but cannot push or open issues or pull requests.
Urwahl3000-Childthemes/functions.php

35 lines
575 B
PHP

<?php
/*Load Stylesheet */
function kr8_childtheme() {
wp_enqueue_style( 'kr8-childtheme-css', get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'kr8_childtheme',1000 );
// 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');
?>