Crave: A modern WordPress theme with appetizing aesthetic


Results 1 to 4 of 4

Thread: WordPress tip: how to add comments successfully

  1. #1
    Join Date
    Dec 2007
    Location
    Alexandria, MN USA
    Posts
    6,439

    Default WordPress tip: how to add comments successfully

    I had a question but I found the answer already. Since it is a little out of the ordinary but helpful I thought I would share what I found in case someone else would like to know.

    How can you put a comment into a WordPress post or page without it messing things up?

    Every once in a while I would like to comment out a paragraph or even a sentence or two in a WordPress post or page, but if you have tried it you know WordPress does strange things, usually causing two or three paragraphs nearby to drop out of your entry. Last night I needed to drop out a reference to a valuable link which I know I can use later so I didn't want to delete it, for example.

    Here is how to add a comment in WordPress. Begin the comment as usual <!--, but at the end, instead of just putting the tag end -->, put another opening tag, a single space, and then the closing tag, <!-- -->. It works like a charm.
    Last edited by James; 06-03-2014 at 09:13 AM.
    Good Success!

    Website: Success With Money
    "People will forget what you said, people will forget what you did, but people will never forget how you made them feel." —Maya Angelou

  2. #2
    Join Date
    Apr 2007
    Posts
    15,010

    Default

    James this is super helpful. Sometimes I want to temporarily remove something for testing purposes and then re-add it later. I never even thought about commenting it out. Not sure why because I used to do it all the time with HTML sites. Thank you!

  3. #3
    Join Date
    Dec 2007
    Location
    Alexandria, MN USA
    Posts
    6,439

    Default

    Glad to see someone will find it helpful. I'm glad I found this tid bit. I was really disappointed when I found out that my commenting was causing such trouble and feel lucky I found a solution, but I have to say it is really strange how this works. It would be interesting to know why, but I suppose it has something to do with php since WordPress is a php program.
    Good Success!

    Website: Success With Money
    "People will forget what you said, people will forget what you did, but people will never forget how you made them feel." —Maya Angelou

  4. #4
    Join Date
    Apr 2007
    Posts
    15,010

    Default

    Yeah PHP just doesn't read tags the same way as I've also found out the hard way many times. lol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •