• I am not able to provide a link to the website because I am building it on my Mac desktop with Local.? I am working with WordPress 6.2 and the Twenty Twenty Three theme with minimal plugins and the latest version of Local.

    Is it possible to create a template part which includes a header and a sidebar that can be used on both a page and post so that there is an editable area for content that is not part of the template part or even the page or post template?

    In other words I want a header under which there are two columns where one column is a list of topics that should always look the same on every page or post and the second column contains whatever content is appropriate for that page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think it’s possible, but I wouldn’t do it.

    First, I think rather than editing template parts, you’d need to edit the templates of all the post/pages to create a two-column layout below the header. One column would be your sidebar, maybe based on a reusable block or Navigation Block, and the other the page content.

    The reason I wouldn’t do it is that it would cause issues with mobile devices due to the lack of available width to display both columns. That, I believe, is the reason most themes these days don’t use sidebars.

    Thread Starter Richard Patterson

    (@richardpatterson)

    Thanks. This is what I have been doing but I get differences in spacing of the header and the sidebar between the pages and the posts depending on whether or how I add the post title block to the posts.

    The columns turn into a stack when the screen is below a certain width, but frankly at this point I don’t care what the website looks like on a phone. I am interested primarily in how it looks on a desktop screen.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Template Part with header and sidebar’ is closed to new replies.