• Resolved Phil

    (@umz)


    Hello

    I a getting a lot of SPAM. So I want to change the settings so “only registered users can comment”. I know how to do this. Go to settings > discussion > check the box “users must be registered and logged in to comment”.

    When I do this I get the problem that the header and footer come together and the white space vanished. The text is present but it just overlaps the footer. Obviously looks very odd.

    Any idea please.

    The site is: https://www.tandooricookingexpert.com/

    Thank you in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator t-p

    (@t-p)

    Is it set to “users must be registered and logged in to comment”?

    It displays fine for me in FF.

    You may need clearing cache in your browser before viewing the updated page. To clear cache in your browser, press clrl+f5 keys simultaneously. Also, try different computers / different browser.

    there is likely some error in comments.php within all the conditional code for all the possible combinations of ‘comments’, ‘comment-open’, ‘register’ etc.

    can you paste comments.php into a https://wordpress.pastebin.com/ and post the link to it here?

    Thread Starter Phil

    (@umz)

    i am very grateful for the quick replies.

    thanks t-p. my apologies. when you looked the “users must be registered and logged in to comment” was not set because it messes up the look of the site.

    note: the homepage looks fine. it only look wrong when you go into any post now / page.

    thanks i will alchymyth. the comments.php can be found at:
    https://pastebin.com/embed_js.php?i=vajp21hC

    Moderator t-p

    (@t-p)

    yes, i see now.

    Likely the problem might be caused by an open <div> tag. See validation results – markup errors.

    For example, see this error:

    end tag for “div” omitted, but OMITTAG NO was specified
    </body>?
    You may have neglected to close an element, or perhaps you meant to “self-close” an element, that is, ending it with “/>” instead of “>”.

    @t-p
    the validation report always tells you what is missing, but is often useless in helping to find the location of the missing element.

    @phil
    in your case, there is a </div> missing at the end of the comments part;

    edit comments.php; at the end:

    </form>
    </div>
    
    <?php endif; // If registration required and not logged in ?>

    try to move the </div> to after the endif:

    </form>
    
    <?php endif; // If registration required and not logged in ?>
    
    </div>

    as you can see, the closing div was inside a conditional statement, and would be output only in one of the possible conditions = easily done, but = bad programming

    good luck ??

    Thread Starter Phil

    (@umz)

    thank you t-p. i dont know much about programming so alchymyth got it bang on for me.

    thank you alchymyth. it has worked and looks right.

    may you both prosper.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove comments, theme not showing right’ is closed to new replies.