Replicate sidebar on all HTML pages

0

I'm studying a code, and putting together a website with it. However, I made changes to the dashboard sidebar, but they were not replicated to the other pages, so I would like that when I changed the dashboard, all the sidebar of the other pages would change as well. How can I do this?

Here is part of the code:

link

I changed that way on the dashboard: link

But when I go to another page, it continues the old way (in this case I would have to change it one by one, and I did not want to do that, I want it to change on the dashboard, go to all other pages): link

    
asked by anonymous 18.04.2018 / 04:35

1 answer

0

From what I saw you use PHP on your pages.

Here's what you can do

  • Create a file php named sidebar.php
  • Paste the sidebar code into this file
  • Make require "sidebar.php"; where the sidebar would be on your site.
  • So any changes you make to sidebar.php will also change on all pages as long as they all have require

        
    19.04.2018 / 18:36