• Hi,

    I am relatively new to WordPress – I have just written my first post.

    Could you please help me resolve the following issue:

    I am using the “Emerald Stretch” template on wordpress. Every time someone clicks on “Comment” to leave a comment to a post, the person is taken to the top of the page and they have to scroll down to the comment form to leave a comment.

    And a similar problem when they hit the “Submit” button – instead of the person being taken to the bottom of the post where they can see their comment, they are taken to the top of the page and they have to scroll down to see their comment.

    What code can I use in the template files to change this action. Although I am a beginner I am picking up how to change the code as I go.

    Thanks a lot,

    Lance

Viewing 11 replies - 46 through 56 (of 56 total)
  • Thread Starter lance007

    (@lance007)

    sorry – that was my fault. I adjusted the margin on the heading to try get more space between the heading and the “post a comment”.
    I’ve corrected it.

    but I still don’t understand why my sidebars are below the text. Please just solve this one problem and I won’t bother you again.

    Thread Starter lance007

    (@lance007)

    The Page.php file doesn’t seem to be doing anything. I have tried to completely delete the code in the page.php file and update it without any code in it, and it still does the same thing. It shows the pages, other than the home page, with the sidebars below the text.

    As ever, I don’t know then. Themes aren’t meant to be structured like that as far as I know so I can’t work with one that’s not structured normally. Just try <?php if ( !( is_page(‘page_a’) || is_page(‘page_b’) || is_page(‘page_c’) ) ?> and <?php endif; ?> around the comments form, but change the page_a bits to the short names. But really, I don’t know. Try a theme that’s formatted normally or learn CSS, I really can’t help you.

    Thread Starter lance007

    (@lance007)

    Trust me to pick a screwed up theme. WordPress should have checked it before putting it up on its site.
    If I choose another theme, won’t I have to set everything up again?
    Can you recommend a good 3 column theme as similar to mine as possible.

    What do you mean “around the comments form”? Are you saying to put it in the page.php file above the line that says <?php commeents_template(); ?>

    I just tried to do that and it didn’t do anything.

    Yep, and no idea if it’s the theme or what. I use a 2 column so I’m afraid I don’t know any good 3 column ones.

    Around that line in index.php, your WP is ignoring page.php for some reason I guess.

    Thread Starter lance007

    (@lance007)

    I give up

    Thread Starter lance007

    (@lance007)

    Hey,

    someone on my other thread posted this as a possible cause – do you think it has any merit? I have 6 <div> and 9 </div> in my comments.php.:

    I think the failure is in 'comments.php'.
    there is one closing </div> too many - I just can't be bothered to find out which one.
    you need to go through it div by div and find the excessive one.

    Thread Starter lance007

    (@lance007)

    Kawauso,

    I think I figured out what was happening, but I don’t know why exactly.

    I tried starting my whole blog over again – scrapped the last one completely – signed up for a new wordpress account and started with a completely new theme – Atahualpa. And exactly the same thing happened. Everything seemed to be going ok until I started installing text widgets in the sidebar. After I had installed them on the left and right sidebar my pages other than my home page got all screwed up again – the sidebars were sitting below the text and the text was in one of the sidebars. The right sidebar spanned from the center column all the way to the right sidebar.

    I looked at https://www.validator.w3.org to see whether my site: https://www.Lancesview.com would validate. And it did not. There were tons of errors. Most of them were related to a “&” symbol being wrong. I used it in my postings and meta tags and supposedly that was causing some of the issues.
    The validator also said that I had improper code in my text boxes: I had links to amazon for some books I was recommending and apparently whatever I did, it did not like. It worked when I clicked on the links so I don’t understand.
    I had something like this in the text widget:
    <a target="_blank" href="https://www.amazon.ca/Atlas-Shrugged-Leonard-Peikoff/dp/0452011876/ref=sr_1_1?ie=UTF8&qid=1252792056&sr=8-1-spell>Atlas Shrugged</a>

    I also had some links in my postings which the validator did not seem to like. Something like:
    <a href="mailto:[email protected]">[email protected]</a>.
    and:
    <a target="_blank" href="https://support.apple.com/kb/ht3669">Products Compatible with Snow Leopard.</a>
    and:
    `Canon drivers.

    I do not understand how all these things could screw up my blog so badly. What am I doing wrong?
    Please help me. I have spent about 30 hours over the past few days trying to fix my blog and I have no idea what I’m doing. It shouldn’t be this difficult on wordpress!

    Thanks

    Lance

    Thread Starter lance007

    (@lance007)

    That’s weird I tried to put the code between backticks but it didn’t work:

    <a target="_blank" href="https://www.amazon.ca/Atlas-Shrugged-Leonard-Peikoff/dp/0452011876/ref=sr_1_1?ie=UTF8&qid=1252792056&sr=8-1-spell>Atlas Shrugged</a>


    <a href="mailto:[email protected]">[email protected]</a>.


    <a target="_blank" href="https://support.apple.com/kb/ht3669">Products Compatible with Snow Leopard.</a>


    `Canon drivers.'

    Your last link there has one backtick and one single quote.

    The first line doesn’t have a closing “, which could screw things up royally.

    The second one… the validator is probably just being anal about having a @ in the link rather than the URL encoded form, but that’s not a page-breaking issue.

    I think the target attribute is no longer allowed in XHTML. Again it’s not page-breaking though.

    Take what validators tell you with a pinch of salt. If it doesn’t evaluate as HTML (rather than XHTML), then you’re probably more likely to find the issues that are page-breaking.

    Thread Starter lance007

    (@lance007)

    ok thanks

Viewing 11 replies - 46 through 56 (of 56 total)
  • The topic ‘When click on comments link the reader is taken to the top of the page’ is closed to new replies.