WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type single.php Problems (3 posts)

  1. rich147
    Member
    Posted 2 years ago #

    Hi everyone,

    I've struck a problem with a custom post type (Vehicles) that I have created using the Custom Post Type UI plugin. I've copied the single.php of the theme and created single-vehicles.php

    The problem I have is that for some reason the single-vehicles.php shows the content from both custom posts that I have created.

    Even if I make the content of the single-vehicles.php really basic like this it still does the same thing.

    <div class="content-details">
        <h1><?php the_title(); ?></h1>
        <?php the_content(); ?>
    </div>

    PHP is still pretty new to me - so it's baffling the hell out of me.

    Any insight into what may be causing it would be very much appreciated.

    Rich

  2. rich147
    Member
    Posted 2 years ago #

  3. kevmatic34
    Member
    Posted 2 years ago #

    Can you post your functions.php code where you've established your custom post type? I'm thinking your issue might be in how it's defined

Topic Closed

This topic has been closed to new replies.

About this Topic