WordPress.org

Forums

Wrapping page navigation in html tags? (2 posts)

  1. Pablo
    Member
    Posted 10 years ago #

    I'm trying to use WordPress as a CMS for both a blog and static content and I'm creating a theme for the site.

    For the design I'm trying to acheive, I need to add extra tags around each page link in the navigation. Is there any way I can acheive this using either WordPress template tags or some PHP wizardry?

    I've tried the standard wp_list_pages() template tag but that doesn't seem to allow me to acheive this.

  2. Lorelle
    Member
    Posted 10 years ago #

    You just put them in an html list hard coded where you want them to appear. If you want them to look like the rest of the links, then make sure they are in the <div id="menu"> section inside of a LIST.

    Then write it manually like this:

    <div id="menu">
    <ul><li>Title
    <ul><li><a href="link1.php">Link One</a></li>
    <li><a href="link2.php">Link Two</a></li>
    <li><a href="link3.php">Link Three</a></li>
    </ul>
    </li>
    <li>Recent Articles
    <ul><?php recent articles code ?></ul>
    </li>.......

    Basically. Does that help?

    There are a bunch of tags you can use, built in and plugin based, that will help you do all kinds of things with your sidebar menu lists, you just have to get them laid out right.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.