Display page list not as list? (3 posts)

  1. Yansky
    Posted 9 years ago #

    Is there any way to generate links to the pages of a WP site, but not have them generated as a list?

    I've been trying to use '<?php wp_list_pages(); ?>' and adding different arguments, but it always generates the links as a list.

  2. Kafkaesqui

    Posted 9 years ago #

    I discuss one way of doing that in the following thread:


  3. Yansky
    Posted 9 years ago #

    Thanks very much Kafkaesqui. That worked perfectly. :D

    Could I press you for some more help with generating other navigation links? :)

    How would I go about doing the same thing for wp_get_links , wp_list_cats & wp_get_archives ?

    I tried a few variations of your code like so:

    $cat = wp_list_cats('echo=0');
    $cat = str_replace('<li>', '<div class="subItem">', $cat);
    $cat = str_replace('</li>', '</div>', $cat);
    echo $cat;

    But it didn't work.

    I looked through the code in some of the functions pages in the wp-includes folder to try and shed some light on how the code for the tags are generated, but I'm still pretty new to php & it didn't make much sense to me.

Topic Closed

This topic has been closed to new replies.

About this Topic