• Hi, I’m tryins storefront with a child theme.
    I want to remove popular products and on sale products from homepage, but I can’t figure out how to do in child theme.

    If I edit template-homepage.php in father theme, it works. If I create a new template in child theme removing that 2 categories, it doesn’t work.

    I tried to create a child inc/structure/hooks.php in child theme, but it doesn’t work.

    ANy suggestion?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Umm, not too sure what you are asking.

    You are correct not to edit the parent theme templates as when the parent theme gets updated you will lose everything you did.

    You should have in your child theme a file called functions.php and you should remove, filter and add new hooks in here.

    Look at this URL for a bit more information:
    Understanding Hooks for non tech people

    There are many guides on this but this one explains them for non techy people like me.

    So in short: You need to add and remove all the hooks on your website via the functions.php file in your child them.

    Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey resunoiz,

    To remove these areas from the homepage of the Storefront theme install the Homepage Control plugin below and you can then reorder or disable the homepage sections from the WordPress Cusomizer panel.

    https://wordpress.org/plugins/homepage-control/

    I hope this helps.

    Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi resunoiz,

    Install the Homepage Control plugin as this allows you to reorder or disable any of the Storefront themes homepage elements.

    I hope this helps.

    https://en-gb.wordpress.org/plugins/homepage-control/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to change hooks in child theme?’ is closed to new replies.