• I used this to bring the custom header I’d written in a subfolder installation over to the ‘live’ site on the root. I installed the new theme (a child of 2022) activated it, then used your export function to download the custom header, etc. then imported that to the live site. It’s in the backend, the custom header. I associated it with the home template and the ‘page’ template. But what I’m now seeing on the home page instead of the new header is:

    “Template part has been deleted or is unavailable: custom-header”

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author uxl

    (@uxl)

    Are you able to view the home template in the ‘Code editor’ view?

    Gutenberg plugin is required as code view is not yet available in core.
    With Gutenberg active go into the site editor, select the home template if not already in view.
    Click the 3 small vertical dots in the top right of the editor tools, and select ‘Code editor’.

    The code that references the custom header should be something like this:
    <!-- wp:template-part {"slug":"my-custom-header","theme":"my-theme-slug"} /-->

    Is the “slug” exactly the same as the slug of your custom header?

    Is the “theme” the same as the directory slug of your child theme, or does it match with the parent theme, or something else?

    Plugin Author uxl

    (@uxl)

    Hi @keress

    I’ve tried to recreate the issue that you are seeing but when I do so everything works OK just as it should.

    I started with a child theme of 2022.
    Then in Editor > Template Parts > Add New, I created a custom header.
    Next I edited the Home template and the Page template, replacing the default header with the newly created custom header.

    Then in Dashboard > Design Import/Export I exported the new custom header and both home & page templates of the child theme.
    In another different site I uploaded the export from the first site, and checked to see if I got the error you described or any other errors. It all worked correctly and the imported header template part was visible on the Home and Page templates, both in the backend editor and in the front end.

    Can you confirm this was the process you followed, or did you do something different?

    What naming format does your child theme have? e.g. is it “Themename” (no spaces) or “Theme Name” (with spaces), and what format is the theme directory and the text domain e.g. “themename” or “theme-name” etc?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Does Work — to a Point’ is closed to new replies.