Site logo

Archived topic

Helpful Advice to Fix Custom Posts Not Showing

26 replies · Started by Ken on July 11, 2021

Viewing posts 16–27 of 27

Okay I uploaded the two templates for “One Product Post”. Not sure how to share the link to my GIST, here goes…
content-one_product.php

The link isn't working.

You can share the GIST by sharing it's URL. :D

Yes! Solved the theme editor problem. I'm using Patch a security plugin, the disable editor was selected. I re-enabled it. Theme editor is back.
Hopefully the custom post problem will be easy too. I hope. I understand this may take some time. No problem, I'm going to make a pot of tea.

Elvin,
If for some reason you need to get access to my wordpress dashboard here's the Temporary Login.

Thanks.

On your single-one_product.php.

Can you change this line - generate_do_template_part( 'single','one_product' );

To this line - get_template_part( 'content','one_product' ); ?

Let us know how it goes.

Looks like my message crossed.
I will check the 'echoed get_field with my coach on where the 'excerpt' should be.
But for now, I just need to confirm doing the same template changes to the other templates.
Again thank you so much for this. She'll be very happy. Maybe she'll leave Kadence and come join GeneratePress...that's what
I did.

My final question: Should i go ahead and do the same for the rest of the Custom Post Types? That is, change to “get_template_part( ‘content’,’the_templates_name’);

Yeah that's pretty much it. You'll have to change that line on the respective single-your_CPT_template.php so it calls the appropriate content-your_CPT_template.php.

Great! Will do the changes.
Elvin, thank you sooo much! I'm closing this ticket with a smile, hope you're smiling too.

No problem. Regardless of the difficulty of the ticket, we're genuinely glad when it gets sorted. :D

This archived topic is closed to new replies.