Skip Navigation

[Resolved] ‘Others’ section not showing for use assignment in Layouts

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

Last updated by Paul Bowman 6 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#1141426

I’m referring to documentation here in order to set up an error page:
https://toolset.com/documentation/user-guides/designing-custom-404-error-pages-with-layouts/

Permalinks on the site are not set to ‘plain,’ and I have switched among non-‘plain’ options to see if simply changing the setting would make a difference. But regardless of the permalinks setting I choose, the ‘Others’ section does not appear for me in the use assignment panel in Layouts.

#1141981

Nigel
Supporter

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

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

Hi Paul

It is a hold-over from earlier versions of Layouts that it requires the theme to be integrated for custom 404 error pages to be possible (and this information is missing from that documentation page).

You can trick Layouts into thinking the theme is integrated by adding the following code snippet to your site:

/**
 * "Integrate" theme with Layouts
 */
add_filter('ddl-is_integrated_theme', '__return_true');

We have an internal ticket to update this (remove the requirement or document it), but the above should serve as a workaround for now.

#1142425

That’s helpful for starting to understand what’s at issue. Thanks!

Unfortunately, although adding this filter hook does enable the ‘Others’ section for use assignment, it also breaks Layouts functionality on the front end altogether. Most of my pages end up blank. Any ideas about what that might be attributable to? I don’t know much about what comes into Toolset working with the theme (GeneratePress in this case).

#1142992

Nigel
Supporter

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

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

Oh. That's unfortunate.

I only got as far as testing that it enabled you to create a custom 404 Layout, not how it affected the front-end when you did.

Testing that now, I didn't see any issue such as you describe (blank pages), but I did find that the custom 404 page itself didn't work.

And looking further into it, I'm not sure that it would be expected to. Unless you are using a genuinely integrated theme (rather than just tricking Layouts into thinking you are with the above code snippet), then Layouts can only replace the_content() in the PHP template. And a 404.php template is unlikely to output the_content(), precisely because there is no post to output.

I will verify with the Layouts developers, but it seems to me we need to update the documentation to say that you simply cannot create a custom 404 page (except where you are using a fully-integrated theme, which you almost certainly are not).

In your case, to create a custom 404 page you will need to copy the 404.php template to a child theme and then directly edit that php template according to your needs.

#1148237

Yes, this makes the whole issue a good deal clearer. I’ll deal with it in the child theme files as you suggest. Many thanks.