Home Forums WoodMart support forum Where does the header in Woodmart find the PHP file?

Where does the header in Woodmart find the PHP file?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #645695

    ha21cn
    Participant

    Since my site is a menu with multiple HTML blocks, I now want to use the Fragment Cache function of the W 3total Cache to Cache the menu, but I can’t find the PHP file for the Woodmart Header, where can I find it, please?

    #646002

    Hung Pham
    Participant

    Hi ha21cn,

    Thanks for reaching to us.

    The header in the WoodMart theme is typically generated by the header.php file located in the theme directory.

    Regards,

    #646598

    ha21cn
    Participant

    If I change the files in the WOODMART theme, will subsequent Woodmart updates overwrite my content

    #646628

    Hung Pham
    Participant

    Hi ha21cn,

    Copy the header.php file from the main theme and place it in your child theme to prevent changes from being lost during theme updates.

    Regards,

    #647486

    ha21cn
    Participant

    I see that your Header Builder has the component Main Menu, I would like to know what is the Hook for this component? Can I use this tag as a fragment caching code group?

    #647819

    Hung Pham
    Participant

    Hi ha21cn,

    All WoodMart templates of theme elements that are intended for the Header builder are located in the woodmart/header-elements folder, including the Main Menu element in the file woodmart/header-elements/main-menu.php

    Regards,

    #648238

    ha21cn
    Participant

    So what if I want to customize the code and make sure that the Woodmart update doesn’t affect the main-menu. . In my modified header-elements folder. PHP file, what do I need to do?

    There is also a home page where the PHP file can be modified?

    #648331

    Hung Pham
    Participant

    Hi ha21cn,

    Thanks for your patience.

    As I explained above, in order to avoid the changes, you need to copy the header.php file from the main theme and place it in your child theme to prevent changes from being lost during theme updates.

    Regards,

Viewing 8 posts - 1 through 8 (of 8 total)