Viewing 15 replies - 1 through 15 (of 15 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which links would you like in your footer? If the links are similar to your navigation menu at the top, you could re-use the function that creates that menu.

    Thread Starter DAZDOREY

    (@dazdorey)

    I want to put ….
    HOME OUR MISSION GMP GOALS LIFESTYLE.. etc… all the headings I have in my Header Menu.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Look at the function which generates your menu, in header.php.
    It may be something like wp_nav_menu().

    Use that function in your footer.

    Thread Starter DAZDOREY

    (@dazdorey)

    Hello AN,
    In the header.php….. the only place I see the “wp_nav_menu().” code is in a paragraph that reads….

    <?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
    				<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    			</div><!-- #access -->
    		</div><!-- #masthead -->
    	</div><!-- #header -->
    
    	<div id="main">

    Confused…. as always….. where do I get that code?

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Copy this

    wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) );

    And paste it into footer.php (wherever you want)

    Thread Starter DAZDOREY

    (@dazdorey)

    Hi did AN….
    getting closer….

    will you take a look…. crazy huh!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Try placing the function in this

    <div id="footer" role="contentinfo">
     ...
    </div>

    Thread Starter DAZDOREY

    (@dazdorey)

    OOOPS …. lost my Footer!

    This is what I did…

    <?php
    /* Always have wp_footer() just before the closing </body>
    * tag of your theme, or you will break many plugins, which
    * generally use this hook to reference JavaScript files.
    */
    </div>
    <div id=”footer” role=”wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) );
    “>

    </div>
    ?>
    </body>
    </html>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Try

    <div id="footer" role="contentinfo">
     <?php
      wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) );
     ?>
    </div>

    Thread Starter DAZDOREY

    (@dazdorey)

    No luck….

    see the complete code ….

    </div><!– #wrapper –>

    <?php
    /* Always have wp_footer() just before the closing </body>
    * tag of your theme, or you will break many plugins, which
    * generally use this hook to reference JavaScript files.
    */
    </div>
    <div id=”footer” role=”contentinfo”>
    <?php
    wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) );
    ?>
    </div>
    ?>
    </body>
    </html>

    Did I delete or add something extra????

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I can’t tell what you have and haven’t deleted.

    Thread Starter DAZDOREY

    (@dazdorey)

    I made a mess…… yikes

    Thread Starter DAZDOREY

    (@dazdorey)

    Hello Andrew Nevins,

    I got my “footer” back. YAHOO!

    I placed the code
    <div id=”footer” role=”contentinfo”>

    ( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) );
    </div>
    <div id=”colophon”>

    in and I see small type….

    is there a next step?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Wrap the function with <?php ?>
    E.g

    <?php
      wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) );
     ?>

    Thread Starter DAZDOREY

    (@dazdorey)

    will try…. thank you!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Adding text to the footer’ is closed to new replies.