• I’m trying to add a >> using » after links using a list_pages function, but every place I try breaks the site.

    Am showing the list of children only if there are children. Adding the » after echo children puts the character after the last link, but is not a link itself. I would like the character to be part of each link.

    This is what I’m using:

    <?php
    if($post->post_parent)        /* section navigation */
    $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else
    $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
    if ($children) { ?>
    <ul class="subnav">
    <?php echo $children; ?>
    </ul>
    <?php } ?>

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • If each link is a list element, then can’t you slap it all in a #div and style it using the pseudo-class :after?
    https://www.topxml.com/css/css_pseudo_element_after.asp

    Thread Starter csleh

    (@csleh)

    yes, but I was hoping for something to add to the code so that IE users would see it.

    I’ve read in the codex that some tags allow for outputing a character before or after, but I’m not sure where I could add that to the above — when I try the whole site goes white screen.

    Thread Starter csleh

    (@csleh)

    I’m pretty sure this is a php/code question. If I can’t add a character automatically to the list in the code above, is there some other bit of code that will generate a character after a link?

    I’ve been searching but am not finding any info — looking for “add character” “add text” with automatic, link, wordpress, php etc in google. Looking for an option like “nextlabel” or something.

    Perhaps I’m phrasing incorrectly — if you know better search terms please share!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘automatically add character after link’ is closed to new replies.