Support » Developing with WordPress » How to override block theme single.html in child theme

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @wmwmwm ,

    Just to confirm, is your child theme activated?

    To override a template file in your child theme, check the path of the parent theme’s template file and then create a file in the same path in your child theme and with the same name . So,

    wp-content/themes/twentytwentythree-child/templates/single.html

    is the correct way to go about overriding single.html.

    Please share the code you added in your child theme’s single.html file so that I can have a better look.

    Thread Starter wmwmwm

    (@wmwmwm)

    Thanks, @kaavyaiyer

    I checked again.

    I changed wp-content/themes/twentytwentythree-child/templates/page.html, so the changes were shown.

    But wp-content/themes/twentytwentythree-child/templates/single.html changes are not reflected.

    I found Appearance > Themes, Select Theme customize button, Side menu > Templates, Single has mark and says “This template has been customized” like

    https://gyazo.com/9a02d05d1ac19d8f01512c04658bb6e8

    Do I have to clear customizations to makewp-content/themes/twentytwentythree-child/templates/single.html changes work?

    Thread Starter wmwmwm

    (@wmwmwm)

    Ah, clearing customizations made my html changes reflect.

    Thanks for helping!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.