Support » Fixing WordPress » Custom Post Type single.php Problems

  • 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter rich147

    (@rich147)

    The problem can be seen at:

    It is currently showing two galleries, but each gallery is from two individual custom posts.

    Any help very much appreciated.

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Post Type single.php Problems’ is closed to new replies.