Skip Navigation

[Resolved] Unable to add view. Does toolset work with Bold Themes ( hidden link)?

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

Problem:
Does Toolset work with the Showcase theme from Bold Themes?

Solution:
Not without editing the theme files.

Views will work with themes which use the_content() to render the post body (most themes), or with themes which use a custom function to render the post content (by registering the function in Toolset > Settings > Front-end Content).

Neither of these were possible with this theme, which would require making edits to the theme's PHP templates to use the_content for it to work.

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

This support ticket is created 7 years, 6 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 8 replies, has 2 voices.

Last updated by Nigel 7 years, 6 months ago.

Assisted by: Nigel.

Author
Posts
#518114
ToolsetDashboard.png
Edit Post Type ‹ Carlton Communications Group — WordPress.png
Edit layout ‹ Carlton Communications Group — WordPress.png

I am trying to:

1. Build a new taxonomy for a new type of post called a "case study". I have created the new post type and added new fields. This part seems to be working.
2. Build a new post-type view that shows individual case studies. It seems to build ok but does not display within my them properly.

Before we try to solve the problem:

Q1 - Does Toolset work with themes created by hidden link. Specifically, the "Showcase" theme.

Link: hidden link
Link: hidden link

Q2 - Does toolset work with a plugin used by bold-themes.com on their themes called Rapid Composer?

Link: hidden link

If Toolset does work with bold-themes.com themes, and is compatible with the Rapid Composer plug-ing, then I'm doing something incorrectly.

I'm attaching a couple of screen shots to show you what I've done with the taxonomy and view.

Q3 - What is the difference between a page that displays a bunch of posts laid out in a grid, that when one post is clicked on, causing it to open a new page with just a single post?

Thank you for your help.

#518249

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Robert

I'm not aware of any issues with either the themes or the plugin, and the only way to answer the question about whether Toolset works with them is to try and see.

Start with the question of theme compatibility. Toolset is compatible with most themes out of the box, with a couple of provisos.

Layouts effectively has "Full" and "Lite" modes. For the full mode, themes need to be integrated to work with Layouts, which involves making relatively modest edits to the theme PHP templates described here: https://toolset.com/documentation/user-guides/layouts-theme-integration/. We provide integration plugins to do that for you for the most popular themes.

With integrated themes you have full control over the design of the entire page, including the header, footer, and sidebars, in addition to the main content area where your posts are displayed.

In the lite mode (when not explicitly integrated) Layouts behaves like most page builders and can only be used to edit the content area of the page: the header, footer etc. are rendered by your theme.

That's also how Views works (and you can use Views without using Layouts), it renders only the content part of the page.

Specifically it takes over the rendering of the part of the page generated by the_content() function. That is the standard way most themes render the post content.

Non-standard themes that use a custom function to render the post output need special handling to work with Views (or Layouts in lite mode), as described here: https://toolset.com/documentation/user-guides/editing-view-templates/theme-support-for-content-templates/

Not having a copy of your theme I can't say whether it is a standard theme or not, but very few themes cannot be made to work with Views as described above.

Regarding the plugin, again, I'm not familiar with it, other page builders work okay with Toolset although do sometimes need special handling. If there is something specific that you are trying to use the plugin for which isn't working and I can investigate further (you'll need to provide me with a copy). As Layouts is a page builder, adding another page builder into the mix may create issues, and it depends on exactly what you are trying to do and what your preferences are: if you like that page builder it may make sense to not use Layouts and use Views in conjunction with your preferred page builder, or you may find you can do what you want with Layouts and Views and don't need the additional plugin.

So, having said all that, can you describe what exactly you want to do and I'll make sure you are doing it right, and if it doesn't work I can investigate why.

(I didn't understand "It seems to build ok but does not display within my them properly".)

- You have a custom post type called Case Studies
- You are using Layouts to create a template for single Case Study posts, which, because your theme is not integrated, will only take control of the content area of those posts, and the theme will render the header and footer.

What is the problem you are experiencing?

#518819
MyFrontEndLayoutWithADifferentTheme.png
CaseStudyEditScreen.png
CaseStudiesAdminScreenshot.png

Nigel,

Thank you for the reply. I really appreciate the detail. I'm a newbie at both WordPress and Toolset (although I do have some c# and python experience...) so the detail is very helpful.

Let me describe what I'm trying to do.
1) I want to have the ability to create a new type of post that I'll call a "case study". This new post will have a custom set of fields.
2) I would like to be able to create a new "case study" from the WordPress admin pages, and be able to show a "case study" on the front end to website visitors.

I think I've gotten these two steps accomplished correctly.

Using your tool, I have already been able to create the new post type called "case study". I've attached two screenshots:
1) CaseStudiesAdminScreenshot.png
2) CaseStudyEditScreen.png

Unless you see an issue with these screens, this information is background info as I have been able to create and edit new "case studies". Kudos to your toolset that I could do this so easily.

Now, I want to display this data.... this is where I'm having trouble. e.g. This is the problem...

I'd like to display two screens:
1. The first screen would show all the case studies. I'd like it to appear and function like this screen that is included in my theme. hidden link
2. When a user clicked on a tile in the first screen, they would be taken to a second screen that shows the information for a single "case study". But, here's what I'm actually getting: hidden link . Obviously, I'm doing something wrong.

[For information only, these case study screens should function like this example from another organization: hidden link and hidden link These examples are very close to what I'm trying to do. At this point, you probably thinking I should just hire their developer and be done with it.... :>) ]

[Interestingly, if I use a different theme, the second screen with an individual case study shown is sorta-kinda-close to what I'm after. I think this means that I've sorta done o.k. laying out the view. This screenshot is titled MyFrontEndLayoutWithADifferentTheme.png]

I've reached out to the themebuilder and asked some questions...
1) I asked what bootstrap they were using. Response: The theme's grid is based on customized version of Bootstrap grid - we have added one more breakpoint to it. So you can use all the Bootstrap utility classes for hiding and showing elements and columns on different resolutions for example. On the other hand, content elements are custom made, no bootstrap components were used as the bases for the content elements.
2) I asked if they were using the get_content or some other function. Response: We are using the_content but also get_the_content, depending on template. get_the_content is used in archive-portfolio.php, index.php, single-portfolio.php and single.php, while the_content is used in page.php and woocommerce/single-product/tabs/description.php
3) I asked about using a cutom post type in their grid component. Response: The best way to achieve using your own custom post type in Latest Posts element is to edit showcase/showcase.php file in Showcase plugins editor. The Latest Posts formatting starts from the line: class bt_latests_posts {

Also, I'm happy to upload theme file, but your image upload does not allow uploading zip files.

Thank you
Robert

#519010
Template.png
ContentTemplate.png
CaseStudyView.png

A few more screenshots to help with diagnoses...

#519021

Note: I've requested to use your new video/google hangouts support option. I am very flexible on date and time - with just a bit of notice, I can probably do this anydate/anytime. Thanks

#519279

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Robert

I'm back after the long weekend, sorry for the delay replying to you.

Most of what you have set up looks fine according to those screenshots, the problems seem to be in generating the page output.

According to the theme developer's responses, the grid should work fine, I may need to check how they are using get_the_content in the template files.

Our team leader will be in touch about possible slots for a video support call, but in the meantime I will need a copy of your theme.

I'll mark your next reply as private, and you can share a URL where you have uploaded a zipped copy of the theme (e.g. dropbox). There will also be fields where you can share you site credentials, and it wouldn't hurt for you to provide those in case I need to take a look at your site directly (I'll let you know if I'm going to do that.)

#519738

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Robert

I took a look at the theme, which isn't a standard theme in terms of simply using the_content() to output the post body, and using the debug mode Views was unable to identify a function that can be registered in place of the_content to work automatically.

If you want to get the theme to work with Toolset you will need to make a few edits, which could affect some of the functionality of the theme.

For single posts (e.g. when viewing a single Case Study post), these are rendered by single.php.

If you look at that you will see it uses get_the_content to retrieve the post body and stores this in $content_html.

It then includes one of the following template parts, depending on your theme settings:

/views/post-single-columns.php
or
/views/post-single-standard.php

Editing post-single-standard.php it then outputs the post body like so:

echo '<div class="btArticleBody portfolioBody ' . esc_attr( $extra_class ) . '">' . $content_html;

You would need to edit this so as to use the_content(), like so:

echo '<div class="btArticleBody portfolioBody ' . esc_attr( $extra_class ) . '">';
the_content();

I checked that, and now when viewing single custom posts they correctly use the Views content template or the Layout assigned to the single posts if there is one.

You would need to make similar edits to the columns-based template if you are using that theme option, and similarly you will need to make further edits to the template files used for the archive pages.

In the folder showcase/views/ you will find the relevant template files (e.g. post-list-standard.php), which will each need modifying in your child theme to work with Views and Layouts.

You will also note that there are specific templates for the built-in portfolio post type (archive-portfolio.php and single-portfolio.php) and you could duplicate these, renaming them to archive-case-study.php and single-case-study.php, if you want the output of your case studies to match the style used for portfolio posts. You will need to edit these, however, in the same way as described above so that they work with Toolset, and you should read through the template code to see if there are further changes that would make sense for your case study post type.

#519771

Nigel,

Thank you for looking at the theme and providing some suggestions on how to get it to work with Toolset.

One last question... I've looked at several different themes from different theme developers and have not been impressed by any of them.

Can you recommend a theme developer/company that has good code design (e.g. follows wordpress standards) and is based on one of the theme frameworks supported by Toolset?

Thank you, - you guys have really great support!

#519778

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Robert

I'm somewhat reluctant to make recommendations, not least because I no longer develop sites myself and so am not actively using them.

But, we did ask our users recently what free themes they prefer to develop with (so that we might prioritise one or two of them to develop a deeper integration with) and reading the replies to that post would be a good place for you to look for inspiration: https://toolset.com/2017/04/what-starter-themes-do-you-want-to-see-integrated-with-toolset/

There were some very strong recommendations for GeneratePress (https://wordpress.org/themes/generatepress/). I took a quick look at the code, and the PHP templates use the_content() to output the post body, meaning it will work out of the box with Views content templates and with Layouts in the "Lite" mode where you can use it as a page builder for the content area.

So... if I were embarking on a new project I would give it a try first...