Parent / Child formatting in a list of post of a custom post type

I’m guessing the part you want to change is the actual content output area (not the nav). If so, you could do this: <?php $args = array( ‘post_type’ => ‘manual’, ‘posts_per_page’=>’-1′, ‘orderby’=>’menu_order’, ‘order’=>’asc’ ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); $class=”parent”; $header=”h1″; if ($loop->post->post_parent !== 0) { $class=”child”; $header=”h2″; … Read more

Get the posttype of a taxonomy/term

On StackOverflow user indextwo suggests to do the following: Use the get_taxonomy( $taxonomy-slug ) function which returns an object that contains all the associated post types. As suggested in the comments, we can then use get_post_type_object( $post-type-slug ) to get the object and Singular Label. $post_type_names = array(); // Array( ‘post-type-slug’ => ‘Post Type Label’ … Read more

Rewrite Custom Post Type URL slug

If the city and region is always city and region strings, you can do something like this. For your specific case, you could do it like this: ‘rewrite’ => array( ‘slug’ => ‘city/region/event’ ), ‘hierarchical’ => true, ‘has_archive’ => false, ‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’, ‘page-attributes’), If the city becomes some city and the … Read more

Separate Posts and Custom Post Type in Custom Taxonomy archive template

Going from memory this should work for posts <?php $query1 = new WP_Query( array( “post_type” => “post”, “tag” => $term->slug) ); ?> The first query will only return posts that have been tagged [TEAMNAME] (as far as I can remember custom taxonomies can show up as tags on a post). This should work for teams … Read more

Disable comments from showing up public for Custom Post Type

Removing Custom Post Types’ comments from Recent Comments Widget The arguments for the recent comments widget can be customized using the widget_comments_args filter. To customize the post types types whose comments will be included, we can customize the $post_type variable: $post_type Post type or array of post types to retrieve affiliated comments for. Pass ‘any’ … Read more