0

I have a wordpress site but am in the process of building it as a html5 site (just to have it available, if need be). My question is about linking to a very large menu list that I would rather not have to copy and paste into ever page. I am hoping for something along the lines of...

link rel="stylesheet" type="text/css" href="menu.css"

but linking to the menu list not the css. When I have tried this it doesn't work. I have also tried this...didn't work

object data="html/stuff_to_include.html" Your browser doesn’t support the object tag. /object

I would like to maintain the HTML-ness of the site but if I need a script does anyone know of a simple elegant solution?

Thanks I would appreciates any suggestions, I am getting desperate.

Mike Kinghan
  • 55,740
  • 12
  • 153
  • 182
  • I found a solution relative to my comprehension of PHP. https://www.sitepoint.com/community/t/how-to-call-a-menu-file-with-php/242421 I hope it works. I will let you know. – Tony Schaefer Aug 01 '17 at 01:50

1 Answers1

0

The best way apart from keeping your menu in a database is to hold it in a JSON file. This thread has a lot of info how you can maintain a JSON file and use it to populate info on your page.

Aydin4ik
  • 1,782
  • 1
  • 14
  • 19
  • Thanks for the quick response. Does it make a difference that this menu list will be static (no updating needed) once its in place? – Tony Schaefer Aug 01 '17 at 01:33
  • No, it doesn't make a difference. You can update a JSON file or you can leave it intact and use it to pull data from it. – Aydin4ik Aug 01 '17 at 02:55