Custom post type not obeying styles
-
Hello,
I’ve created a custom post type for FAQs. These are displayed on the front end by using a shortcode which I’ve also created.
Within this shortcode is the query to display all FAQs. (Code below)
function team_list_sc() { ob_start(); $member_args = array( 'post_type' => 'member', 'posts_per_page' => -1, 'order' => 'ASC', 'orderby'=> 'menu_order' ); $internal_teammembers = new WP_Query( $member_args ); if( $internal_teammembers->have_posts() ) { while ( $internal_teammembers->have_posts() ) : $internal_teammembers->the_post(); $role_field = get_post_meta(get_the_id(), 'teamRole', true); ?> <div class="internalTeam floatLeft cleared"> <div class="teamImage floatLeft"> <?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } else { ?> <img src="<?php echo get_template_directory_uri();?>/images/teamplacement.jpg" alt="<?php the_title();?>, <?php echo $role_field; ?>"> <?php } ?> </div> <div class="teamContent floatRight"> <h2><?php the_title();?></h2> <span><?php echo $role_field; ?></span> <?php the_content();?> </div> </div> <?php endwhile; } wp_reset_query(); $sc = ob_get_contents(); ob_end_clean(); return $sc; } add_shortcode ('team_list', 'team_list_sc'); ?>
On the front end, the FAQs display like posts and not the styling that’s wrapped around the query (e.g div class=”teamImage”)
Can some possibly guide me in the right direction to ‘over ride’ the blog’s style.
In the Custom post type settings, I’ve used the arg ‘has_archive => false. I thought it was this but not.
Any help much appreciated.
- The topic ‘Custom post type not obeying styles’ is closed to new replies.