Forums

[resolved] Adding a non-linked character to the "Edit" link on a post? (3 posts)

  1. ericcarl
    Member
    Posted 4 years ago #

    So I'm attempting to move the "Edit" link on a post so that it's on the same line as the date. I want to input a character that separates the date and the edit link, like this:

    February 26, 2007 | Edit

    I could either add that character like this:

    <?php edit_post_link(' | Edit'); ?>

    But that makes the character part of the link, and I don't want that.

    I could try and add it to the HTML like this:

    <?php the_time('F jS, Y') ?> | <?php edit_post_link('Edit'); ?>

    But then I have a random | character showing up for people who are logged out and don't see and Edit link. How can I get that character to appear as part of that PHP snippet but not part of the link? Thanks!

  2. Kafkaesqui
    Moderator
    Posted 4 years ago #

    Check the info on the 'before' parameter for edit_post_link():

    <?php edit_post_link('Edit', '|'); ?>
  3. ericcarl
    Member
    Posted 4 years ago #

    Ahhh, I see, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags