WordPress.org

Ready to get started?Download WordPress

Forums

Display page list not as list? (3 posts)

  1. Yansky
    Member
    Posted 7 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 7 years ago #

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

    http://wordpress.org/support/topic/90258

  3. Yansky
    Member
    Posted 7 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:

    <?php
    $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

Tags