WordPress.org

Ready to get started?Download WordPress

Forums

Customizing Pages <li> code (2 posts)

  1. toe_head2001
    Member
    Posted 6 years ago #

    I would like to customize the code of the list items of the Pages widget. I want to change the class="" to something static, and I want to add an id="" with the dynamic stuff.

    In others words change

    <li class="page_item page-item-7">
    <a href="http://ex.org/wp/ex" title="Example">Example</a>
    </li>

    to something like this

    <li class="page_item" id="page-item-7">
    <a href="http://ex.org/wp/ex" title="Example">Example</a>
    </li>
  2. Kafkaesqui

    Posted 6 years ago #

    How's about...

    Page-Item-ID plugin
    Download plugin | View source

    To install, download page-item-id.php, upload the file to your wp-contents/plugins directory on your blog's site, and activate Page-Item-ID under Plugins in your WordPress installation. Then... no, that's it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.