WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How do you edit the line at the end of a post (6 posts)

  1. altendor
    Member
    Posted 7 years ago #

    Seasons Greetings!

    I am using the Tiga theme but I think that this observation is true of many themes..

    The current line at and end of a post says:
    "Posted in : <category>, <category> | Edit | (n) Comments"

    In my view it is not obvious to a reader that they can click on the work "Comments" and add a comment.

    How do I change this word to something more intuitive like "Click here to add a comment"

    Many thanks

  2. vkaryl
    Member
    Posted 7 years ago #

    It's in the index.php for your theme (normally.... I don't know the theme you're using). Search for that "Posted in:" string, then look along from there - you'll see some stuff similar to "comments_popup_link" and so on. Somewhere in that area you should find the word or words you want to change.

  3. altendor
    Member
    Posted 7 years ago #

    Thanks vkaryl that was helpful...I found this in index.php

    *****************************************
    <!-- Metadata -->
    <div class="post-metadata">
    <?php _te('Posted in '); the_category(', '); ?> |
    <?php edit_post_link(_t('Edit'),'',' |'); ?>
    <?php comments_popup_link(_t('Comment'), _t(1 Comment'), _t('% Comments')); ?>
    </div>
    *****************************************

    But when I changed any of the words (eg. to 'Click to Comment' the blog crashes with this message:-

    Parse error: parse error, unexpected T_STRING in /home/altendor/public_html/wp-content/themes/Tiga/index.php on line 56

    What am I doing wrong ?

  4. vkaryl
    Member
    Posted 7 years ago #

    Hmmm. Here's what I did just now on one of my blogs at http://vkaryl.net/whispers -

    <?php comments_popup_link('Click Here to Comment »', '1 Comment - Click Here to Add a Comment »', '% Comments - Click Here to Add a Comment »'); ?>

    It displays just fine.... Now, keep in mind that your original is a bit different than mine: I have NO clue what the _t is, possibly it's theme specific, and if that's the case, and the above tweak doesn't work for you, then you might have to try this instead:

    <?php comments_popup_link(_t('Click Here to Comment'), _t(1 Comment - Click Here to Add a Comment'), _t('% Comments - Click Here to Add a Comment')); ?>

    In fact, you might try that last one first, just because it IS different from the theme I tried it in.... and if neither of them work, then you might have to contact the theme author, or hope that someone familiar with the theme and tweaking it happens by and has a better answer for you.

  5. altendor
    Member
    Posted 7 years ago #

    Brilliant - thank you for your help.

    I have put this in :-
    <?php comments_popup_link(_t('Click here to Comment'), _t('1 Click here to Comment'), _t('% Click here to Comment')); ?>
    </div>

    ***Note that the quoted code I first gave you was missing a single quote just before the number "1" in:-
    <?php comments_popup_link(_t('Comment'), _t(1 Comment'), _t('% Comments')); ?>
    ****

    That is obviously what I did wrong...all is ok at http://www.altendorff.co.uk again ;-)

    Many thanks

  6. vkaryl
    Member
    Posted 7 years ago #

    You're welcome. Have fun!

Topic Closed

This topic has been closed to new replies.

About this Topic