SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Wordpress menu

  1. #1
    SitePoint Enthusiast conorp's Avatar
    Join Date
    Feb 2007
    Location
    Australia
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wordpress menu

    Hey guys,
    I'm using WordPress as a CMS and I want to create a menu of all the pages.

    This is the code I found on the codex

    PHP Code:
    wp_list_pages() 
    http://codex.wordpress.org/Template_Tags/wp_list_pages

    The problem though is that the pages are shown but in a dot point list.

    What is the correct code?

    Conorp

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi conorp,

    That template tag is generating the correct HTML. However, your WordPress Theme has not been styled to present that raw HTML the way you want it to appear.

    If you can link me to the Web site, I'll be able to tell you what CSS code you need to use in your Theme's style.css file to present that list as a proper menu.

  3. #3
    SitePoint Enthusiast conorp's Avatar
    Join Date
    Feb 2007
    Location
    Australia
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Dan, I checked the css and found the error.

    Conorp

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, glad you got it fixed then.

  5. #5
    Non-Member
    Join Date
    Jan 2009
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what caused it? would you mind sharing it here ?

  6. #6
    WordPress Freelancer banago's Avatar
    Join Date
    Dec 2006
    Location
    Vlor, Albania
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what caused it? would you mind sharing it here ?
    It was caused by the improper use of CSS. You need to remove the bullets by adding:

    list-style-type: none;
    to your CSS class or ID of the pages menu.
    WPlancer.Com - PHP & WordPress Developer
    ProverbHunter - English Proverbs Explained


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •