WordPress.org

Ready to get started?Download WordPress

Forums

How to link top links? (2 posts)

  1. MooseDesign
    Member
    Posted 7 years ago #

    Hello, I'm new to this and am just getting up to speed and I've hit a wall trying to figure out how to get HTML links at the top of the page to go anywhere... I've seen lots of site with it so I'm sure I'm just overlooking something.

    Here is the site in question (under construction): http://rockfordgrayblogcom.wctclient.com/

    The links I am wondering about are at the top right (Archives, About, and Contact).

    Here is a piece of sample code for the About link itself within header.php (for which there has been created a corresponding page in "Pages" in the WP control panel):
    <a class="<?php if (is_page('About') || is_page('about')) { echo $classchn; } ?>" href="<?php bloginfo('url') ?>/about">About</a>

    Any help would be greatly appreciated! Thanks in advance!

  2. MooseDesign
    Member
    Posted 7 years ago #

    Hello all! Sorry to have cluttered up the Support, but I think I've figured it out... I guess this could come in handy for anyone with a similar problem.

    To make a top link from a theme dynamically grow with your pages, use the following code:

    <?php wp_list_pages('title_li='); ?>

    Hope this helps someone else!

    On to the next set of issues! ;)

Topic Closed

This topic has been closed to new replies.

About this Topic