Move Header & Navigation into a separate html

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10034281
    rgourineni
    Participant

    I would like to move the Header (including the navigation menu) & footer into a separate html and load that html in other pages as needed. My goal here is to have the menu in place that way if any changes were to be made, I can only edit in one place.

    I am not sure if you already have a mechanism in the template to do that. But I tried to do that using JQuery Load…it works as far as loading is concerned…but some of the styles and any animation is not working…particularly the sticky feature. How can I get this to work or suggest me if there is any other way.



    Template Version: 8.0.0
    #10034283
    Support
    Keymaster

    Hello, first thanks for your purchase.

    The best way is use a server side code language such as PHP to create header.php and footer.php files. Then for each new page you create you can include these partials.

    Learn more about that here:
    https://stackoverflow.com/a/35769918

    We do not recommend use jQuery.load(), since this is very bad for user experience and SEO (google search). Also you will have problems like sticky header not working. This occurs because the code for sticky header is being executed before the header html content it’s in the page. If you want to proceed with it, you need make sure the HTML of header it’s already in the DOM before executing the theme core scripts.

    We hope this helps!

    Let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


    If you are satisfied with Porto HTML and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads


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

This topic is marked as "RESOLVED" and can not rceive new replies.