I was wondering if someone could help me out. I have used this function:
function add_taxonomies_to_pages() {
register_taxonomy_for_object_type( 'category', 'page' );
}
add_action( 'init', 'add_taxonomies_to_pages' );
if ( ! is_admin() ) {
add_action( 'pre_get_posts', 'category_and_tag_archives' );
}
function category_and_tag_archives( $wp_query ) {
$my_post_array = array('post','page');
if ( $wp_query->get( 'category_name' ) || $wp_query->get( 'cat' ) )
$wp_query->set( 'post_type', $my_post_array );
}
to addIt adds categories to my wordpressWordPress pages, but the category archive pages wontwon't display. I have a category called Association Landing PagesAssociation Landing Pages with the slug association-landing-pagesassociation-landing-pages
. iI am developing locally. so when iWhen I go to localhost/mywordpressitefolder/association-landing-page ilocalhost/mywordpressitefolder/association-landing-page
I am getting a page/file not found error.