• Resolved persy

    (@persy)


    Hi,
    I’m using the Sketch theme for my blog:
    https://www.persephone-coelho.com
    and I recently followed the advice in this thread to create a child theme so that I could create a comments popup link on the front page of my blog just below the post title and after the date:
    https://www.ads-software.com/support/topic/theme-sketch-comments-and-tags-not-visible-on-front-page?replies=6
    I followed the instructions and it worked fine, however there is one tiny change I would like to make to the comments link and I don’t know how.
    On some of my posts, where people have commented, it now shows the date followed by the number of comments eg. ‘November 12, 2015 2 comments’.
    All I want to do, is add in a vertical line between ‘2015’ and ‘2 comments’. This vertical line appears on the posts that don’t have any comments between the date and ‘add a comment’. I’m sure this is so simple for someone who understands coding but I’m afraid its beyond me and I’m worried I will make a mistake.
    Many thanks for your help in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Kathryn Presner

    (@zoonini)

    What if you try adding a pipe — that’s what the vertical line is called — before the comment number placeholder (%):

    <?php comments_popup_link( '<span class="leave-reply">' . ' | ' . __( 'Add a comment', 'sketch' ) . '</span>', _x( '1', 'comments number', 'sketch' ), _x( ' | %', 'comments number', 'sketch' ) ); ?>

    I haven’t tested this, but you could give it a try and see if it does the trick.

    Thread Starter persy

    (@persy)

    Hi Kathryn,
    Yes it worked! Thank you so much- I know that probably seemed so obvious but I had no idea what to do!
    I’ve also added the pipe (now I know what its called) before the ‘1 comment’ bit too.

    Thanks for your help!

    Moderator Kathryn Presner

    (@zoonini)

    You’re welcome! I’ll mark this thread as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding a vertical line between the date and number of comments’ is closed to new replies.