Custom Post Type UI
[resolved] Can't display only one custom post type post on a custom post type template (2 posts)

  1. morgon
    Posted 3 years ago #

    I've installed this plugin: http://wordpress.org/extend/plugins/custom-post-template/, and enabled it for custom post types. However, I can't seem to limit the post template I've made to only show the 1 post in a single post template kind of way.

    What I'm doing is using the custom post types UI plugin (http://wordpress.org/extend/plugins/custom-post-type-ui/) to create the post types for "Case Studies" on my client's site. There is a "case studies" page template which shows a list of the case studies, and I need to show each case study on their own single page.

    I'm wondering if there is some unique way that the Custom Post Type UI plugin creates custom post types that would be hindering this?

    Here's the code I'm using to display on the post template:

    <?php query_posts( 'post_type=case-studies','showposts=1'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h1 class="page-title" itemprop="headline"><?php the_title(); ?></h1>
    <div id="content">
    		<dd><?php the_field('situation'); ?></dd>
    		<dd><?php the_field('challenge'); ?></dd>
    		<dd><?php the_field('approach'); ?></dd>
    		<dd><?php the_field('result'); ?></dd>
    </div> <!-- end #content -->
    <?php endwhile; ?>
    <?php endif; ?>

    Any help?

  2. Michael Beckwith
    Plugin Author

    Posted 3 years ago #

    Ever get around this issue morgon?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic