Skip Navigation

[Resolved] Layouts integration with OnePress theme

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

Problem: I would like to use Layouts with the OnePress theme to design my CPT single post page.

Solution: With OnePress and most other themes, Layouts will allow you to design the main content area of a CPT post. The main content area is shown in the screenshot below as an orange box. Everything outside that box is controlled by your theme, and Layouts is not able to control it. Some other themes have integrated their Theme Options into Layouts, allowing more control over the page design. OnePress is not fully integrated yet. So to disable the page header and post title outside the box, you must use custom CSS to hide that content.

.single-utisak header.entry-header {
  display:none;
}

Relevant Documentation:
https://toolset.com/documentation/user-guides/layouts-theme-integration/

This support ticket is created 6 years, 9 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
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 8 replies, has 2 voices.

Last updated by aleksandarI-4 6 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#620177

Tell us what you are trying to do?
I want to display a post without my theme's options.
Is there any documentation that you are following?
Yes, but it says it's pending an update and instructions are unclear now.
Is there a similar example that we can see?
Not yet, I just started
What is the link to your site?
hidden link

1. Auto-draft option is showing even tho I removed "Title"
2. I want to remove posted/published by and date
3. Share buttons should only be displayed on the bottom

#620225

Hi, can you tell me some more information about your site?
- What theme is active? If there is a parent theme, let me know the parent theme.
- What plugins are active?
- Is this page design created in a Layout, or in a Content Template, or something else?

You can use the Toolset debug information panel to provide me the theme and plugin information. Here is a link to some information about providing debug info:
https://toolset.com/faq/provide-debug-information-faster-support/

#620240

- What theme is active? If there is a parent theme, let me know the parent theme.
The theme is OnePress, only that one is installed and active.
- What plugins are active?
Numerous small plugins for functionalities and optimization like Yoast.
- Is this page design created in a Layout, or in a Content Template, or something else?
Page design is theme's default. I don't see option for creating page design as it asks me to integrate the layout/template first.

#620257
main-content.png

In most themes, like OnePress for example, you can control the main content area of a post with Layouts. I am attaching a screenshot showing the main content area represented as an orange box. Create a new Layout, assign it to all Posts, and you can design everything inside the orange box area. This approach was implemented because most people are satisfied with the overall design structure of their theme, they just want to control the main content area and not the header, footer, main navigation, and so on.

Without Layouts active, you have the ability to control the same orange box area with a Content Template. However, Content Templates do not offer the same drag and drop builder interface you can find in Layouts.

You mentioned theme options. Layouts was recently updated to support theme options applied to each Layout individually. However, I do not see that the OnePress theme has added the required theme option configurations to their theme files yet. Here's a blog post discussing the themes that currently have their theme options integrated in Layouts:
https://toolset.com/2017/10/views-2-5-and-layouts-2-1-offer-tight-integration-with-popular-themes/
For other themes, we recommend their authors join our Beyond Pages program for information about integrating theme options with Layouts: https://toolset.com/documentation/beyond-pages-program/

1. Auto-draft option is showing even tho I removed "Title"
2. I want to remove posted/published by and date

The OnePress theme option "Disable Page Title bar? Check this box to disable the page title bar on all pages" only hides the title bar on the native WordPress post type "Page". It does not affect other post types, as far as I can tell. To remove the Title, date and other elements outside the orange box, you can create new PHP templates that do not include the header content. If you aren't interested in creating new PHP files, you can add some custom CSS code to hide the existing header. Try adding this to the Layouts CSS panel:
[php]
.single-utisak header.entry-header {
display:none;
}

3. Share buttons should only be displayed on the bottom
I may be able to provide a solution if you can tell me more information. How are these Share buttons added to your site? Are they inserted by a third-party social sharing plugin, part of the OnePress theme options, or some other integration I'm not aware of?

#620285

Thanks, I fixed all except for the last one.

I use a plugin called "Simple Share Buttons" for social media buttons. Hope that helps.

#620612

It looks like the best option here is to use the plugin's shortcode feature instead of automatic button placement. Please go to Settings > Simple Share Buttons. In the Classic Share Buttons tab, turn off all the Location toggles to disable the automatic placement of these buttons. Then scroll down to and open the "Shortcode" panel. Copy the shortcode. Edit the Layout for this post type and add a Visual Editor cell. Paste the shortcode to place these buttons in your Layout. Repeat the Visual Editor cell process for all Layouts that should include these buttons. Try that out and let me know if it does not resolve the problem satisfactorily.

#621050

Ok, that solved it, but I have additional questions now:

1. How can I avoid double title? (One is post title, the second one is field(which I need). I'd like to get rid of the first post title from being displayed
hidden link

2. What's the best way to add the shortcode to all single CPTs? It would take too long manually as there will be thousands of them.

#621084

1. How can I avoid double title?
The code I provided earlier should handle that. Did you add this code to Layouts CSS?

.single-utisak header.entry-header {
  display:none;
}

2. What's the best way to add the shortcode to all single CPTs?
I think the easiest way is to add it to a Visual Editor cell in a Template Layout, and assign the Template Layout to the CPT Single Post pages. You will have the option to apply the Template Layout to all existing posts in that post type automatically.

#621104

All works now! Thank you 🙂