Site logo

Archived topic

Layout element - sidebar not showing on Custom Post Type Archive

5 replies · Started by Laura on November 12, 2020

Viewing posts 1–6 of 6

Hi,

I've set up a layout element that should show a sidebar on a custom post types archive pages.

Sidebars have been turned off in the customiser.

I've got a child theme with a few extra template files in (for the custom post types) but all of the files have been based on copies of the generate press defaults.

I've only got three layout elements, and I figured it might be a conflict with another layout so I set it to exclude this page.

Normally, I'd slog away trying different options but I'm on a bit of a tight deadline and I'm not really sure what I've done wrong.

I seem to remember having to do *something* to turn off sidebars for these pages in the first place, but I cannot remember what I did.

Any help would be really appreciated!

Thanks
Laura

Hi there,

does the CPT display the Sidebar when it is enabled across the site in the Customizer settings?

Erm, no - although it does look like the 2/3 grid is now in play now that I've turned it on across the site.

No sidebar is being loaded on my custom post type archive but there's a gap for it when it finally does show up :)

Hi there,

Any chance you can link us to one of those pages?

Do these archives have custom templates? What happens if you temporarily disable them?

So: deactivating my custom template and it works.

I did a quick diff check and I *may* have deleted if ( generate_has_default_loop() ) {

(Let's pretend this never happened ;) )

Glad you got it sorted :)

This archived topic is closed to new replies.