Custom Taxonomy in Permalink from post type

Set your taxonomy slug to taxonomy_name and in your post type set the slug to taxonomy_name/%taxonomy_name_term% and flush rewrite rules (simply by going to permalink settings panel in the admin) And after that WordPress will be able to handle /taxonomy_name/%taxonomy_name_term%/post-name/ URLs. So all that is left to do is tell WordPress what %taxonomy_name_term% means and … Read more

white page after php code insert for custom post type [closed]

You forgot about endwhile; at the end of loop. Using template don’t forget to get_header() and get_footer() Sample: <?php /* Template Name: Test */ ?> <?php get_header(); ?> <div class=”infoboxen”> <div class=”box”> <?php $loop = new WP_Query(array(‘post_type’ => ‘drei_boxen’, ‘posts_per_page’ => 10)); ?> <?php while ($loop->have_posts()) : $loop->the_post(); endwhile; ?> </div> </div> <?php get_footer(); ?>

Show posts of parent in edit.php

If you are using just using 4 posts, I think that schools would better be suited as taxonomy terms rather than a post type. Associate your Posts with the school tax term. I would then create custom templates for each of those terms. taxonomy-schools-cambridge.php taxonomy-schools-teeside.php taxonomy-schools-newcastle.php taxonomy-schools-sunderland.php Within those templates, use a WP_Query object to … Read more

Show custom posts with a specific “custom TAXONOMY slug” on startpage

For taxonomy superevent and term true: add_action(‘pre_get_posts’,’wpse57309_alter_front_page_query’); function wpse57309_alter_front_page_query( $query ){ if( $query->is_main_query() && is_front_page() ){ if( !$query->get(‘post_type’) ){ //post type is not set, the default will be an array of them: $query->set( ‘post_type’, array( ‘news’, ‘events’, ‘tv’ ) ); $query->set( ‘superevent’, ‘true’ ); } } }