最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to set background color of template part in Site Editor?

programmeradmin5浏览0评论

This should be obvious and indeed I did it before - without code I am sure. And now I cannot see how. The suggested articles seem to be about pre site editor WordPress. Surely I can simply apply a theme colour as the background to a template part somewhere? thanks

This should be obvious and indeed I did it before - without code I am sure. And now I cannot see how. The suggested articles seem to be about pre site editor WordPress. Surely I can simply apply a theme colour as the background to a template part somewhere? thanks

Share Improve this question asked Mar 13 at 7:30 Justin WylllieJustin Wylllie 415 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

In Site Editor (I'm using latest WordPress 6.7.2) Open the Document Overview (staggered 3 bar icon, Shift-Alt-O) Note: This is "Edit Site" not "Edit Page" on the top bar, or left menu Appearance, Editor.

Header is actually a "template part", you can have multiple headers and multiple footers, and each template can use 0 or 1 (or sometimes you want more) headers or footers.

If you enter the Site Editor using Appearance, Editor, you see Design, which lets you select Patterns; Header and Footer are Patterns. This is where you can "Add New Pattern" (for example have a Header, with a different color, to use on a Page/Post template you specify for only specific pages)

The template you are editing (seen top bar, center, probably "Single Posts - Template" or "Pages - Template) most likely has, at the top-most level, 3 areas: Header, a Group, Footer.

If not, (for example, it shows "Group" only) you may have to double-click on the visible header area, to select it for editing.

This is the important part: Select the element you want, to set the background color. You can not set the color if you have selected "Header"; you have to select an element within the header, most likely the outermost Group.

If you have a Row or Container within that outermost Group, you probably want to set that color to "transparent" so the outermost Group sets the color. Or, deliberately set the boxing on the inner Row to show a different color.

Once you have the element you want selected, set the color just like anything else in the Block Editor. The Styles panel on the right will have colors in the current palette. Set both text and background colors.

I'm writing in more detail and with images, https://website-tech.glerner/2025-changing-template-header-or-footer/

Yes, you can set the background color of a template part in the WordPress Site Editor without using code. Here’s how:

  1. Go to Site Editor: Navigate to Appearance > Editor (Site Editor).

  2. Select Template Part: Click on the template part (like Header or
    Footer) you want to edit.

  3. Open Block Settings: In the right sidebar, find the "Styles" or "Block" settings.

  4. Change Background Color: Look for the background color option under "Color" and pick a theme color or custom color.

  5. Save Changes.

This should work seamlessly!

发布评论

评论列表(0)

  1. 暂无评论