• I’ve created a series of custom header templates by duplicating then editing existing ones, but now I have a whole series of template parts with names simply appended with “-copy”, “-copy2” etc. Is there a way of renaming templates and template parts created using the duplication method? I cannot seem to find any way to rename them at all or even give them an original name when duplicating them, which seems like an obvious thing to be able to do alongside duplication.

    Alternatively, should I be creating these variations of template parts be some other means other than duplicating existing ones?

    • This topic was modified 1 year, 2 months ago by pipspeak.
Viewing 3 replies - 1 through 3 (of 3 total)
  • I cannot seem to find any way to rename them at all or even give them an original name when duplicating them.

    When you click the same three-dot icon you clicked to duplicate the template part (next to the duplicated template part, not the original), you have the option to RENAME, DUPLICATE, or DELETE any of the new template parts you’ve created.

    Alternatively, should I be creating these variations of template parts be some other means other than duplicating existing ones?

    That’s your choice, but if you want to create a new template part from scratch instead of duplicating an existing one, use the Plus (+) sign to the right of PATTERNS. See the second screenshot below.

    Alternatively, when you’re on the “All template parts” screen, you have the option to rename any of the custom template parts you’ve added and create new ones. See the third screenshot below.

    Thread Starter pipspeak

    (@pipspeak)

    When you click the same three-dot icon you clicked to duplicate the template part (next to the duplicated template part, not the original), you have the option to?RENAME,?DUPLICATE, or?DELETE?any of the new template parts you’ve created.

    This is not what I see. Instead I click the three dots and my only option is to Duplicate. On a few of them I also have the option to Clear Customizations. But in no case do I have a rename option, which is what puzzled me.

    This is for the series of “Template Parts” I created (for unique headers and footers) that exist in the “Patterns” section of the editor (WordPress 6.3, Twenty Twenty-Three theme). I have the original header and footer in template parts, and then under “template parts – general” I have all the new ones I created. None of them have a rename option.

    None of them have a rename option when I view them on the All Template Parts screen either. In fact there are only three dots next to the original header and footer and one copy I made, but none of the others. Clicking on the three dots that are there simply give me the option to clear customizations.

    Any idea why I’m not seeing that rename option anywhere? I’m logged in as the same admin I’ve always used and was used to create the new template parts so I’m baffled. Something’s gone wrong somewhere.

    Thread Starter pipspeak

    (@pipspeak)

    I should add that there is some other weird behavior I’m currently seeing in the FSE, most notably the fact that all the custom page templates I created and named at the time have now reverted to names with the prefix “wp-custom-template-” in the template manager. I know this is the way they’re stored in the database, but what happened to the regular names I gave them and which all the non-custom templates still seem to have? Registering the names in the theme’s json file makes no difference, and no plugins seem to be causing the behavior.

    • This reply was modified 1 year, 2 months ago by pipspeak.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Renaming duplicated template parts’ is closed to new replies.