Needing website menu on other pages

Discussion in 'HTML & Website Design' started by Jamessmithiv, Sep 27, 2012.

  1. #1
    Hello, I need some help trying to get the menu on http://www.wordsmithrecords.com to also go on the forum page and event page of the website. Any help would be appreciated, I'm willing to pay to have this done if the price is right.

    Thanks
     
    Jamessmithiv, Sep 27, 2012 IP
  2. scottlpool2003

    scottlpool2003 Well-Known Member

    Messages:
    1,708
    Likes Received:
    49
    Best Answers:
    9
    Trophy Points:
    150
    #2
    I'd put it in an include file so that you only have 1 editable menu across multiple pages.

    Create a new file called menu.php and add the code:

      <div id="menu">
    
    <ul>
    	  <li id="m01"><a href="http://www.wordsmithrecords.com">Home</a></li>
      <li id="m02"><a href="http://www.wordsmithrecords.com/music-entertainment-news">NEWS</a></li>
          <li id="m03"><a href="http://www.wordsmithrecords.com/entertainment-events/">Events</a></li>
    	  <li id="m04"><a href="http://www.wordsmithrecords.com/artist.html">ARTISTS</a></li>
    	  <li id="m05"><a href="http://www.wordsmithrecords.com/store/storehome.html">STORE</a></li>
                <li id="m06"><a href="http://www.wordsmithrecords.com/southern-illinois-entertainment-and-music-related-forums">Forum</a></li>
                <li id="m07"><a href="contact.html">Contact</a></li></ul>
    	
    </div>
    Code (markup):
    Save it to an includes folder in your root path so /includes/menu.php

    Then wherever you want to display the menu, just type the code:

    <?php include "includes/menu.php";?>
    PHP:
     
    scottlpool2003, Oct 2, 2012 IP