• When listing pages with wp_list_pages, the output generates output like this:
    <li class=”page_item page-item-5″>

    How can I modify the classes used? There is no need for me to have individual format for single pages. So page-item-x is too much. How can I get rid of it?

    pi

Viewing 4 replies - 1 through 4 (of 4 total)
  • Why would you want to get rid of it?

    Thread Starter piology

    (@piology)

    Because it is bloated. Bad HTML style.

    It’s not bad HTML at all. WP is a blogging platform with 1001 uses. Those classes are there so different site owners/developers can customise their installs/themes. If you don’t like the output of wp_list_pages, you could try writing your own page listing loop using get_pages instead.

    Thread Starter piology

    (@piology)

    Any definition not used is BAD. It is fine to allow customization, but this is the only place I find where it is kind of forced.

    Thanks for the hint on get_pages. But I might even hard-code it.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘wp list pages: Setting classes’ is closed to new replies.