[resolved] using wp_list_pages to create a menu (6 posts)

  1. marcool
    Posted 9 years ago #

    Is it possible that the output of wp_list_pages looks like a an horizontal menu?
    Does that require some CSS tricks or the use of another function??


  2. Class
    Posted 9 years ago #

    Is it something like the look of Blix you're after? If so, grab Blix and see how it's done.

  3. marcool
    Posted 9 years ago #

    Hummm No.

    Blix is indeed almost good... but a bit dirty to my mind...
    I really need to use wp_list_pages and Blix is using some custom BX_list_pages or so to get the list of pages.
    But I really need to use wp_list_pages as I'm using Gengo for multilingual purpose. Gengo is giving a different output for wp_list_pages wether you are browsing the website in a language or another.

    So if I can trick the output of wp_list_pages then I will get my menu built automagically :)

    Anybody knows how to do that?

    thanks anyway Class !!

  4. marcool
    Posted 9 years ago #

    If someone has a very good idea to give... I'll be interested .
    Otherwise the solution I use now comes from Gengo which provides Snippets that can be displayed in any language provided that you give the translation...
    and automagically :)

  5. Class
    Posted 9 years ago #

    I see the post is marked as resolved but I'll reply anyway.

    It's been a while since I looked at the Blix code but I was thinking of the looks really.
    Anyway, it's all CSS. Blix did it custom but I can't see why styling a regular output of wp_list_pages should be difficult?

  6. kath
    Posted 9 years ago #

    You can change the style of the top-level ul to have display:inline, and then all of your pages will go be displayed in one line. You can then change ul ul (being more specific to get only the sidebar ul) to display below the appropriate li with some styling.

    However, if you need more styling options (like you need to add other tags around them) you'll have to find a way to edit the output of wp_list_pages or make a custom function like blix did.

Topic Closed

This topic has been closed to new replies.

About this Topic