WordPress.org

Ready to get started?Download WordPress

Forums

HTML Comment destroys formatting (15 posts)

  1. markljackson
    Member
    Posted 6 years ago #

    When I used blogspot (decades ago, in the dark ages) I would comment out my technorati tag links, and my comments on my code that I customized for blogspot. When I imported to WP dot com (2005, I believe) from blogspot, the comments forced the sidebar to the bottom.

    It was very time consumining to edit all of my posts to remove the comments. After days of trying I gave up, and decided to just live with it. Not happily, but live with it I did. I just figured it was part of WP dot com. Now that I have my own site, and have started seeing old posts being hit (politics, and some local news); it's becoming an issue again.

    OK I totally understand why you would not want this on WP dot com. What I don't get is why this does not work on a hosted version.

    Is there a way to fix this? I tried using the PHP comment, but that does not work.

    If this can not be fixed, then I may just have to rip out the comments via SQL (anyone have clue how I can do that?).

  2. whooami
    Member
    Posted 6 years ago #

    I doubt anyone has a clue what you are talking about, much less how to fix it. How about providing a link to something someone can see, or being a little less vague in your description.

    "HTML comment" could mean a thousand things.

    "destroys" equally vague.

    Furthermore, this:

    "I tried using the PHP comment.."

    whats that?

    Youre not speaking lingo that anyone is going to recognize.

  3. markljackson
    Member
    Posted 6 years ago #

    If no one here understands what I am saying then it's time to switch to Movable Type. This is very basic coding I am talking about.

    However to help out, here are some links:

    HTML comments

    PHP comments

    Why you should comment

    Even WordPress thinks it's a good idea

    Like I said, the commenting of technorati tags in the post; forces the sidebar to the bottom of the page. This is common for WP when it encounters a tag that is not closed. So I am confused as to why this is going on at all.

  4. iridiax
    Member
    Posted 6 years ago #

    I'd remove the unused, trouble-causing commented out tags in the posts using something like the Search and Replace plugin.

  5. whooami
    Member
    Posted 6 years ago #

    when you explain that you are commenting OUT code .. that helps to explain what you are referring to. yes, you use that term above, but its lost slightly after reading your topic title:

    HTML Comment destroys formatting

    comment == a thing I leave on your blog.

    If this can not be fixed, then...

    I, like others, have plenty of comments within my theme files, and havent seen a single issue. Dunno, hard to say without seeing your site, and what you are doing.

  6. markljackson
    Member
    Posted 6 years ago #

    I'd remove the unused, trouble-causing commented out tags in the posts using something like the Search and Replace plugin.

    I will take a look at that. Thanks.

  7. markljackson
    Member
    Posted 6 years ago #

    I, like others, have plenty of comments within my theme files, and havent seen a single issue. Dunno, hard to say without seeing your site, and what you are doing.

    Geezus guy. How many times do I have to say it's IN THE POST, not the code.

  8. whooami
    Member
    Posted 6 years ago #

    oh, im sorry, i guess this entire thread was a clusterfuck for me.

    Please refrain from refering to me as a guy though. bad assumption.

    IF you want to use comments within posts you need to treat them as code, so you use something like simplecode, or one of the syntax plugins.

  9. eharris
    Member
    Posted 5 years ago #

    I've got this same problem. I can open comments with "< ! - -", but if I try closing comments with "- - >" (added spaces just to prevent possible problems), it gets replaced with "–>" - so my comments open, but are never properly closed. They still close in random places, but I'm not really clear on why.

    I can create some workarounds, but a page I frequently update has a lot of commented text. I'm trying to convert the entire site to WordPress (from static HTML), and the simple method I've been using all along apparently won't work because the WP HTML editor mucks with dash-dash-greater-than, the HTML close-comment command.

  10. jeenie
    Member
    Posted 5 years ago #

    I'm with eharris. In my post text, WordPress opens the comment, but replaces the double dash with an en dash. Is there a fix to this? This is very frustrating.

    <!-- this is a comment. Let's see if it closes --> <-- it screws this side up.

  11. bjou
    Member
    Posted 5 years ago #

    Ok, same problem here, let's figure this out. Which theme are you using? I use the i3theme 1.7 classic. I can confirm, that no plugin is responsible for that. Can anyone else confirm this? When I changed the theme, it does not occur.

    The problem with my installation seems to be, that the i3theme (somehow?) places every post entry into a comment as well, i.e. first there is <!-- posted stuff here --> and after that the same posted stuff, but NOT within an html comment. Now if there is an html comment within a post and this post is packed into the html comment by the theme(?), then comments get messed up. Anyone else with me on that?

  12. bjou
    Member
    Posted 5 years ago #

    Ok, guys, forget what I just wrote. My bad, I worked with the code some time ago and messed it up myself. This has nothing to do with your problem...

  13. eharris
    Member
    Posted 5 years ago #

    This is not a theme issue, but an issue with WordPress' HTML parser.

  14. jeenie
    Member
    Posted 5 years ago #

    Eharris - is this something that is being worked on? Did you see this in another thread? Please share, thanks!

  15. eharris
    Member
    Posted 5 years ago #

    jeenie, I haven't seen it in any other threads, and I don't know if it's being worked on. I'd like to see it fixed, which is why I chimed in on it a month ago.

Topic Closed

This topic has been closed to new replies.

About this Topic