Skip Navigation

[Resolved] Problem with custom post type using the single.php template. Need to create a di

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 7 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#562793
Screen Shot 2017-08-23 at 15.02.40.png

I am using divi with wp-types.
I have a custom post type named: plase (farms)

I am trying to:

Link to a page where the issue can be seen:
hidden link
hidden link this is a single post for this custom post type

When I display a single post for this custom post type, the content for this post type loads inside of the the standard single.php template that comes with every them. Divi theme has a standard post template that has a title, featured image, content and side bar with widgets... basic blog post layout.

I expected to see:
I expected to create or use a theme template like plase-single.php that is a blank page i could load the the wp-types content in. Same as we use page.php or project-single.php used within divi.

Instead, I got:

So instead you see the single.php's featured image, title, sidebar, comments. See example link

Question:
Do i need to change the single.php to accommodate wp-types? aka, clear it out. Ideally there should be an option to choose the theme template you are going to use. Example divi blank template.

Question2:

I see in your demo's you include galleries in your single posts. How can i add a gallery to my custom post types / post fields?

Please assist

#562808

Do i need to change the single.php to accommodate wp-types? aka, clear it out.
Hi, Layouts integration with Divi is designed to work inside the framework provided by Divi's single.php page. This means Divi controls the site header, footer, nav, sidebar, etc. and Toolset Layouts can control the main content area of the site. If you want to change how this integration works, you must create your own template PHP file (in this case, copy single.php into single-plase.php) and remove any Divi content you do not wish to include on the single plase page.

Ideally there should be an option to choose the theme template you are going to use.
The point of Toolset is that you don't need to use PHP, so we don't provide an interface to select from different PHP template files. If you want to override the default functionality of Layouts integration, you must create your own PHP template file that will be applied to your post type according to the WordPress Template Hierarchy rules.

I see in your demo's you include galleries in your single posts. How can i add a gallery to my custom post types / post fields?
Galleries can be added to any post using the standard WordPress gallery shortcode:

[gallery] or [gallery ids="1,2,3,4,5"]

Include the IDs of images from your Media Library to have them appear in this gallery, or include no IDs and WordPress will create a gallery based on the images attached to this post. If you want to use images stored in custom fields, a custom shortcode will be required.
More information about the gallery shortcode:
https://codex.wordpress.org/Gallery_Shortcode

If you need additional assistance with the gallery, please create a separate ticket so we can address that issue for you. This will help us keep the forum organized, and help other users find answers to similar problems.

The forum ‘Types Community Support’ is closed to new topics and replies.