[Resolved] X Theme / Views display

Hi, we have a longer queue than usual at the moment, the wait time is around 20 hours, please hold on while we reply to tickets in the order they are opened.

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.

This thread is resolved. Here is a description of the problem and solution.

Problem: 1) X Theme + the X Theme Cornerstone plugin + Types plugin 2) Create a custom post type "movies" with Types plugin The single "movies" display different with wordpress built-in post type "Pages"

Solution: Please check these in your website 1) locate the theme file which is for rendering the normal page URL: To locate the theme file, you can try with some other plugins, for example: https://wordpress.org/plugins/which-template-file/

2) copy and save it as file "single-movies.php", and test again More help: single-{post-type}.php – If the post type is product, WordPress would look for single-product.php. The single post template file is used to render a single post. WordPress uses the following path: single-{post-type}-{slug}.php – (Since 4.4) First, WordPress looks for a template for the specific post. For example, if post type is product and the post slug is dmc-12, WordPress would look for single-product-dmc-12.php.

Relevant Documentation: https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post

This topic contains 4 replies, has 3 voices.

Last updated by alexandreT 2 years, 7 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#416303

I am trying to: make custom post (Movies) view like this hidden link (X Theme with the X Theme Cornerstone plugin using Types and Views)

I visited this URL: hidden link

I expected to see: hidden link

Instead, I got: the framed/non fullwidth version at hidden link whereas I'm trying to get a fullwidth view without the header

"OUR LATEST NEWS
THE SEARCH FOR SPOCK
Mercurius2016-07-13"

Can you help me figure out what I'm doing wrong?

#416537

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Dear Alexandre,

It is a compatibility problem, since I do not have a copy of the "X Theme", I can not duplicate same problem in my localhost.

I suggest you check these in your website
1) locate the theme file which is for rendering the problem URL:
hidden link
To locate the theme file, you can try with some other plugins, for example:
https://wordpress.org/plugins/which-template-file/

2) copy and save it as file "single-movies.php", and test again
More help:
single-{post-type}.php – If the post type is product, WordPress would look for single-product.php.
The single post template file is used to render a single post. WordPress uses the following path:

#416792

Hi Luo! Excellent! Thank you, it's working!

I've summed up my workflow if people need to look it up. It's a bit convoluted but it works!

*****
1) Create a new page with the Cornerstone Visual Editor. This will be your new template mock-up. Put in all the placeholder elements (text, images etc) the way you'd like it displayed. Save everything.

2) Once you are done doing the visual composition, go in Edit Page, and open it in the raw code format. Copy the entire content of the code in the box.

3) Create a new Type with toolset (IMPORTANT: note the "slug")

4) Create the Field Groups associated to the Type.

5) Now would be a good time to create a first custom post of your new Type, just to have a least one example in storage.

6) Create a View associated with your new Type.
A) In the Loop Output Editor, click "Content Template" and click "Create a new Content Template and assign it to this View"
B) Insert your Cornestone Raw Code under Templates for this View - replace placeholders with variables off the Fields and Views category.
C) Hit the Create a Page with this View at the very top. Keep that page open

7) Go to your first custom post and assign it the proper Content Template in the right column

8) Install the Which Template plugin file here: https://wordpress.org/plugins/which-template-file/

9) Reload the page you created in 6C. Hover over the .php bar at the very top to see which file is being used.

10) Download the indicated .php file to edit it and rename it to single-SLUG.php (slug being whatever name you gave it in step 3).

11) Upload the new single-slug.php in the same directory. Your custom type should now be hooked with the right php file

12) If you need to do additional CSS fine tuning, go in the X Theme Custom CSS and edit things starting with "single-SLUG.php .h-landmark span(whatever) {..."

***

Luo my only question is, do I risk losing my single-movies.php file if the X Theme since the php file is not located in the Child Theme?

#416827

Will Toolset be reviewing its compatibility with the X Theme?? It is a VERY popular Theme, I know that lots of people are using it with X Theme..

Masonry layout has been achieved by some very smart but lengthy CSS.. Your Team said it was not possible..

It would be so good if Toolset would integrate X Theme.

#416975

Ok made a few edits. Problem solved! Thank you 🙂

0) Install the X Theme Child theme

1) Create a new page with the Cornerstone Visual Editor. This will be your new template mock-up. Put in all the placeholder elements (text, images etc) the way you'd like it displayed. Save everything.

2) Once you are done doing the visual composition, go in Edit Page, and open it in the raw code format. Copy the entire content of the code in the box.

3) Create a new Type with toolset (IMPORTANT: note the "slug")

4) Create the Field Groups associated to the Type.

5) Now would be a good time to create a first custom post of your new Type, just to have a least one example in storage.

6) Create a View associated with your new Type.
A) In the Loop Output Editor, click "Content Template" and click "Create a new Content Template and assign it to this View"
B) Insert your Cornestone Raw Code under Templates for this View - replace placeholders with variables off the Fields and Views category.
C) Hit the Create a Page with this View at the very top. Keep that page open

7) Go to your first custom post and assign it the proper Content Template in the right column

8) Install the Which Template plugin file here: https://wordpress.org/plugins/which-template-file/

9) Reload the page you created in 6C. Hover over the .php bar at the very top to see which file is being used.

10) Download the indicated .php file to edit it and rename it to single-SLUG.php (slug being whatever name you gave it in step 3).

11) Upload the new single-slug.php in the right into the x-child directory. Your custom type should now be hooked with the right php file

12) If you need to do additional CSS fine tuning, go in the X Theme Custom CSS and edit things starting with "single-SLUG.php .h-landmark span(whatever) {..."