• I changed the code in my template to make “0 Comments” change to “Leave a Comment” but it is not showing up on the home page If you click on a post you can see that my code takes effect, yet the home page won’t show it. I’ve been told by another coder that unless the tags are blatantly specified in the wp-loop.php file, the home page won’t show it. The only problem is that I cannot figure out what to precisely specify to make this appear. My site is:

    https://www.TheDishmaster.com

    and for an example of an individual post where you can see the code take effect, go to:

    https://thedishmaster.com/2011/09/happy-labor-day-dishmaster-vacation.html

    Help is much appreciated!

Viewing 15 replies - 1 through 15 (of 32 total)
  • do a search in each .php files of your theme for “0 Comments”(like the one you changed) and change em ALL to “Leave a Comment”

    Thread Starter Thedishmaster

    (@thedishmaster)

    I did this and it worked, but it only works when you click on an individual post. The home page won’t allow it, because unless it’s specified to appear in the home page, it won’t show up there. I just don’t know what to specify because I can’t code.

    hmm maybe the code is different in the index.php or page.php for some reasons.

    Thread Starter Thedishmaster

    (@thedishmaster)

    I’m not sure why it works this way but I could not even center videos without specifying the center tag in the wp-loop.php file, which allowed for something to be centered on the home page. It’s the same issues with the comments, except I’m not sure what to specify.

    Im sorry i cannot help you.. im used with simple themes that are easy to handle with. Yours seems to be too much complicated for me.

    In you index.php you can see the code like:

    <?php get_template_part(‘content’); ?>

    this code call content.php file. Now you check your index.php and see which file you have in your index.php. Open that file and see this block of code:

    <?php comments_popup_link(esc_html__(‘0 comments’,’Chameleon’), esc_html__(‘1 comment’,’Chameleon’), ‘% ‘.esc_html__(‘comments’,’Chameleon’)); ?>

    Now change 0 comments to Leave a comment.

    it shows as ‘leave a reply’ on the front page, only to be changed a fraction of a second later to ‘0 comments’, probably by javascript, maybe by the disqus plugin?

    Thread Starter Thedishmaster

    (@thedishmaster)

    I don’t see anything similar to that code in the index.php file. I’m pretty sure the issue is that the home page will not allow for that code unless it’s directly specified. I just don’t know what tag to specify. It’s in the wp-loop.php file and here is the code.

    <?php the_excerpt_reloaded(1000, '<h3>,<h4>,<a>,<img>,<p>,
    <ul>,
    <ol>,<small>,<h2>,
    <li>,, <center>, </tr>, </tbody>, <tbody>, <script>, <strong>, <td>, <tr>, <em>, <table>, <embed>, <iframe>', 'content', TRUE, 'Continue Reading', FALSE, 2); ?><br />
                            <?php } ?><br />
    					</div></p>

    <p>Those are all of the tags I’ve specified so that the home page displays it. Again, if you click on the link for an individual post it correctly says, “leave a comment” — it just doesn’t display this on the home page.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Thedishmaster – You need to wrap your code in CODE tags. I’ve tried to fix it… I don’t think I did.

    Thread Starter Thedishmaster

    (@thedishmaster)

    Do you where to insert those tags exactly? Can you tell me where to specifically put them?

    the browser gets this html code from the site:

    <span class="dsq-postid" rel="7171 https://thedishmaster.com/?p=7171">Leave a Comment</span>

    as you can see, it has ‘Leave a Comment’ as text –
    but, some javascript is changing this immideately to ‘0 Comments’

    my suspicion is that the disqus plugin is causing this; have you checked if there is an option or setting in the plugin to change the text?

    Thread Starter Thedishmaster

    (@thedishmaster)

    It is not the plugin. It’s the fact that any tag that is not specified to appear in the home page will be filtered out. Again, if you click on the title of a post itself, you will see that it says “leave a comment” and not “0 comments.” It’s because it just won’t appear on the home page but it will appear on the individual post.

    Thread Starter Thedishmaster

    (@thedishmaster)

    BTW I appreciate your help. It’s one of those little things that is driving me nuts, and I wish I could figure out. I really do appreciate your effort.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Thedishmaster – Look above the reply box that you type in.

    See how it says B, I, link, b-quote, code, ol, ul, li?

    Click on CODE ?? (Also if you read below the box, it tells you how to put code in)

    Thread Starter Thedishmaster

    (@thedishmaster)

    Okay — my apologies for being confused here. I’m looking to have my home page read as “leave a comment” instead of 0 comments. Are you telling me to insert code tags into the template itself? And if so, where in the template would I insert it?

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘How do I change "0 Comments" to "Leave a Comment"?’ is closed to new replies.