WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Linking To Pages From Sidebar? (4 posts)

  1. willamato
    Member
    Posted 7 years ago #

    Hi

    My site is showing a list of my pages, but they don't link to the pages listed.

    This is the code I have in my sidebar:

    <li class="pagelink">
    			<ul class="pagelink">
    				<li><a href="<?php echo get_settings('home'); ?>/">Home</a></li>
    
    							</ul>
    		<ul>
    <?php
    wp_list_pages('sort_column=menu_order'); ?>
    </ul>

    and here is the site:

    http://dougfine.dreamhosters.com/

    I'd also like to get rid of the word "pages" above the pages, if possible.

    Any help is much appreciated!

    Thanks!

  2. MichaelH
    Member
    Posted 7 years ago #

    If you are using the template tag, wp_list_pages, then you should be able to use the paramter 'title_li=' (passing null as the title) to suppress that title.
    wp_list_pages('sort_column=menu_order&title_li')

  3. willamato
    Member
    Posted 7 years ago #

    Thanks.

    I do have that bit of code, and it removed the title from the first, home page link.

    But it still recurs above the list of pages, and the page links dont link to the pages, but link to the first post instead.

    Im really a coding and WP novice...

    I tried "hacking" together the sidebar.php code, and it only seemed to make matters worse.

    Having the listed pages link to the pages seems like a pretty standard thing...but I dont know what Im nissing to make it happen.

  4. willamato
    Member
    Posted 7 years ago #

    This line of code did the trick (listed the pages in order, removed the "pages" tile, and now -- for some reason -- the links work, too)

    <?php wp_list_pages('sort_column=menu_order&title_li'); ?>

    Thanks, Mike.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags