• On the homepage of my blog (https://skindzier.com), the link to the show the comments (“3 comments”) shows up as this:

    https://skindzier.com/#postcomment

    it doesnt have the name of the post in there however (I’m using %postname%), therefore, when you click it nothing happens.

    Even when i click the post, and go to the single.php view, it still doesnt work (although I think it did before, now its fucked all around).

    Can someone help me out with what to put in the single.php?

    that wasnt what i originally came here to ask, but now its not even working anymore on single.php so I guess thats my first question

    my main question is.. i looked EVERYWHERE in my theme, home.php, index.php, defaulthome.php, defaultimage.php and all the other pages in the theme directory, and i cant find where that link would be ANYWHERE. is it somehow calling it from the single.php page?

    I thought there was once a ‘search’ function within dashboard that would allow you to search all your code for certain snippets but now its gone it seems… is there a plugin for this?

    Im sorta lost, my comments are screwed up. Im really getting the hang of editing wordpress though ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • I’m using %postname%

    I certainly wouldn’t recommend just using %postname%. Add at least 1 other variable to your permalinks to limit the chance of a post title conflict.

    Does your index.php template file use comments_popup_link()?

    Thread Starter lifeofplants

    (@lifeofplants)

    wordpress doesnt automatically check if postnames are duplicates?

    I searched for comments_popup_link() and it didnt show up anywhere.

    :/

    Thread Starter lifeofplants

    (@lifeofplants)

    hey bro, I pasted all relevant pages into pastebin.

    If you havent used pastebin, its great ?? just put @@ before any line you want to highlight after you edit it, or you want to point something out.

    I put all of them as I think it may help determine the problem

    I posted them ALL on one page. Read the enormous header ////file.php////// marked like that to find out which file it is.

    https://pastebin.com/m288ff888

    I wish I knew what to change but im seriously lost,… ive tried editing this for close to two hours and I havent gotten anywhere.. i had to result to this forum ??

    Thread Starter lifeofplants

    (@lifeofplants)

    line 233 is where comments show up in the single post, but im not sure where they show up for the main index.

    The relevant file isn’t there. Looks like it’s in the theme_name/includes folder and could be:

    blogstyle.php
    defaulthome.php or
    defaultindex.php

    Thread Starter lifeofplants

    (@lifeofplants)

    holy shit… its in blog style..

    HA!

    that was the one file i didnt look in because it didn’t sound like it would be relevant to an index page, other than just ‘style’

    https://pastebin.com/m439fa778

    Now my only question is… how do I get it to actually work?

    When the user clicks on the comments, nothing happens.

    Esmi, you da man! ?? (or woman)
    Glad you guys are eager to help people, you guys rock

    Thread Starter lifeofplants

    (@lifeofplants)

    https://skindzier.com is the link, by the way

    I think I’ve figured it out now. You need to edit blogstyle.php and single.php theme. Look for <a href="#postcomment"' a little after<div class=”articleinfo”>. You need to change '#postcomment' to#respond`.

    Then, in comments.php, look for comment_form_title. Just above that, there should be a <div id="postcomment"> or similar. Replace that with <div id=”respond”>.

    Thread Starter lifeofplants

    (@lifeofplants)

    Thanks esmi! Getting there ??

    how do i get it just to go to the first comment rather than the reply box?

    I tried #comment_list but that didnt do anything.

    also on the homepage, it’s still not adding the postname before the #respond.

    Im sure its an easy fix to add before it (so it dynamically puts in the postname), but im not sure what WP function does that

    https://skindzier.com

    Thread Starter lifeofplants

    (@lifeofplants)

    #comments… DURRRRRRRR

    figured it out

    now how do I get it to show up on the main page so it adds in the postname like

    skindzier.com/samplepost#comments

    rather than

    skindzier.com#comments

    im assuming this is the blogstyle file?

    Thread Starter lifeofplants

    (@lifeofplants)

    #comments”

    Got it.

    Thanks for your help man !

    Thread Starter lifeofplants

    (@lifeofplants)

    <?php the_permalink() ?>#comments

    now how do I get it to show up on the main page so it adds in the postname like skindzier.com/samplepost#comments

    Don’t. Just let WP do it’s thing. The crucial point here is to have a link that points to #foo and the corresponding div (or A.N.Other block level element) with the matching id in the comments template just above the form. The id ‘respond’ is, I think, crucial to the threaded comment-reply feature that was added in WP 2.7.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Comments dont work on home page’ is closed to new replies.