Forums

[resolved] adding a span in wp-list-pages (5 posts)

  1. carterdea
    Member
    Posted 2 years ago #

    Hi!

    I'd like to add a span in wp-list-pages so that I can use image replacement for one of the options. I'm using a highly customized wordpress theme, although it is my first, so i'm still learning WP.

    So I'd like the output to be
    <li><a href="..."><span>option1</span></a></li>
    Is this possible?

    Here's my URL if it matters: http://realscottsdalerealestate.com/blog

    Thanks so much for your help!

    Carter

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    You should be able to use image replacement techniques without inserting an extra span. Have you checked the classes that wp_list_pages outputs by default in the page source?

  3. carterdea
    Member
    Posted 2 years ago #

    yes. I have .page-item-15 a but I can't hide the text without hiding the background image also. Do you know a good way to do that without the extra markup?

  4. carterdea
    Member
    Posted 2 years ago #

    ok, I'm cool with the extra markup. Does anyone know how to fix my original question? I just want to put a span in there.

  5. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Not with wp_list_pages. You could try using get_pages and building your own page list loop.

Topic Closed

This topic has been closed to new replies.

About this Topic