Skip Navigation

[Resolved] Editing single.php so it pulls custom post

This support ticket is created 7 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 replies, has 2 voices.

Last updated by eileenN-2 7 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#570474
html code for regular post.png
html code for custom post Spotlight.png
code from single.php.png

Posts utilize single.php. I made copies of the html for a regular "post: and the html of my custom post "spotlight". The only difference I see in the two of them is that the type is different. But on my single.php it seems that the class is what is called, and not the type.

Can someone tell me what I need to change in the single.php coding to draw the custom post?

#570499

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eileen,

Thank you for contacting our support forum.

I'm not exactly sure of the issue but your posts should be using the single.php template if there are no templates built specifically for your cpt.

Thanks,
Shane

#570505

Addendum:
From reading I have been doing I am wondering if a javascript to remove the postmetadata would work? If so, what would that script be?

#570506

They do use the single.php file. I thought I could rename it and modify the code to give me what I want.

The code is <?php get_template_part('content-postmeta' ); ?>

How can I change that so that the template isn't pulled, i.e. is not used?

#570507

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eileen,

I'm not sure what you are trying to do exactly.

Because the template already renders your custom posts.

Thanks,
Shane

#570662

I was able to figure it out.