Skip Navigation

[Gelöst] Content Templates not showing on front-end with Impreza theme

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:
Content Template for a custom post type is not showing on the front-end for the posts.

Solution:
Impreza theme is using its custom content function for the Post's body content called "us_load_template".

Add this theme's content function name into Toolset >> Settings >> Theme support for Content Templates section -- Screenshot here:
https://toolset.com/wp-content/uploads/2017/09/570104-Theme_support_for_Content_Templates.png?x71388

Relevant Documentation:
https://toolset.com/documentation/user-guides/editing-view-templates/theme-support-for-content-templates/

This support ticket is created vor 6 Jahre, 6 Monate. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 12 Antworten, has 2 Stimmen.

Last updated by Nick Pierno vor 6 Jahre, 6 Monate.

Assisted by: Noman.

Author
Artikel
#569842

Hi there,

For some reason I can't diagnose, my content template for a custom post type is not showing on the front-end for the posts.

Here's an example: hidden link

The title, description, etc are coming through, ignoring the designated content template. This does appear to be theme-related, since I tried it with Twenty Seventeen on a duplicated (staging) copy of the site: hidden link

Any insight you can provide on why this is occurring, and how I might address it, would be greatly appreciated.

(included login credentials are for the staging copy of the site)

#569915

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Nick,

Thank you for contacting Toolset support. The wp and ftp login info you have provided is not working, can you please double check and provide us working login info. I have enabled the private message box.

Can you please try to create a new Content template, new Custom Post Type and assign it to the new post and check how it works?

Thank you

#570054
#570082

Hey Norman,

I tried creating a new post type and new content template - but got the same result (content template is not showing on the post).

#570090

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for providing login info, I am checking it further to see what's happening in this and will update you accordingly with my findings.

Thanks

#570104

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Theme support for Content Templates.png

I have debugged this issue, I have created a new test project post 1, please check CPT post here: hidden link
Your Content Template is now applied on it and I think its working great now.

Basically Impreza theme is using its custom cotent function for the Post's body content called "us_load_template".

Once I added this theme's function name into Tooslet >> Settings >> Theme support for Content Templates section -- please see screenshot attached, Content Templates starting to work fine.

Please check and confirm, Thank you

#570138

Ahh, I should have caught that. Thanks very much for your help!

#570171

Hey Norman,

Sorry to reopen this ticket, but I'm trying to implement this fix in a specific scenario and I'm running into trouble again ????

It's on a test site that I'm experimenting: hidden link

(The login info I provided previously will work on this site. If you can give me another private reply box, I'll provide FTP info for this site)

I'm trying to use Types/Views along with WP Store Locator to create better individual store pages than WP Store Locator offers by default (and add a few custom fields to the store custom post type).

I'm trying to hijack the store post single.php (single-wpsl_stores.php), and use my theme's page.php code inside of that to get a blank slate for my content template.

The problem is, when I put that template in my child theme, the content template doesn't show up again: hidden link

If I remove or rename single-wpsl_stores.php, it comes back.

If I use debug mode, it tells me that us_load_template is the function I need (hidden link) - but that's already set in the Front-end Content settings!

Basically all I need is just an empty page that displays my content template (without the title and meta info, and ideally without WP Store Locator's default stuff - but I can just hide that with CSS if need be). Any ideas?

#570266

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Nick,

Its a different scenario and a different plugin. Please kindly open a new ticket for this 2nd issue and we would be happy to help. This will help other users with similar problems to find solutions when searching the forum, We do not handle multiple issues in the same ticket as per support policy. https://toolset.com/toolset-support-policy/

You can add this thread link in the new one as reference.
Thank you

#570331

Ok, no problem. I figured it's not really related to the other plugin so much as the theme and is thereby an extension of the original issue (I think the issue would be the same regardless of which plugin's posts I were trying to hijack, because it's the theme's behavior with the custom single.php that is interfering here).

For this reason I think it might even be more useful for future users to see this in context with the original issue.

If you're still convinced it should be a separate ticket, I'm happy to do that. Thanks as always!

#570336

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

It is related but not the same as the original. Here the issue and debugging process will be different, we need to see what happens with php template file that you are trying to assign, because builtin post types or CPTs are working fine after we added the content function. WP Store locator cpt might not be that easy to edit, such plugins also put restrictions to their cpt as its good for a plugin to use its own unmodified cpt with their own templates they added. This might not be as straightforward as it looks.

So yes, please kindly a new ticket for this. You can add link to the new ticket here as well or vice versa, so both can be seen with each other.

Thank you for your cooperation

#570337

I understand and will do that. I just want to make sure my request is clear though...

I don't think this really has anything to do with wp store locator. It's just Views' behavior with single-[posttype].php I'm having an issue with. It would be the same with any plugin (or no plugin).

I wonder if I should have phrased my question as "this solution is working with the standard single.php, but I can't get it to work with a custom one in order to have a blank post page to work from."

Sorry to belabor the point here. I just wanted to make sure the question was clear.

#570338

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

okay got it, custom template. You may close this one and we can continue on the next one.

Thanks

#570342

okay got it, new ticket 😉

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.