WordPress.org

Ready to get started?Download WordPress

Forums

How do I maintain order in my html? (7 posts)

  1. dahliagraphics.dk
    Member
    Posted 3 years ago #

    Hi, I am very new to wordpress. I have worked with html in Dreamweaver and I am used to be able to make as many spaces, sections etc. that I need to have a good overview of what I'm doing.

    BUT in wordpress it will all crumble back to one big mess after I push the update button.

    Is there any way to avoid that? Or am I not supposed to use the editor in wordpress?

  2. jeezyo
    Member
    Posted 3 years ago #

    Have you tried clicking on the HTML tab in the editor? Otherwise the structure will be determined by your themes template files.

  3. jeremyhawes
    Member
    Posted 3 years ago #

    I recommend adding "Comment" commands throughout your page to separate it. As the spaces collapsing is built in I believe and according to W3C it's proper mark-up to do it that way - perhaps even helping speed, but I don't think that speed would change significantly (if at all).

    For your PHP files and HTML files you can add comments as such...
    <!-- YOUR COMMENT HERE -->

    For CSS
    /* YOUR COMMENT HERE */

    For Scripts
    // YOUR COMMENT HERE, NO ENDING STATEMENT AND IT ONLY IS ADDED TO 1 LINE

    Let me know if that helps.

  4. dahliagraphics.dk
    Member
    Posted 2 years ago #

    It doesn't work. The <!-- YOUR COMMENT HERE --> will just disappear if I go to the visual tab and back to html again. Is this something that the wordpress team is working on fixing? Because this is very frustrating when I normally like writing my own html.

  5. jeremyhawes
    Member
    Posted 2 years ago #

    This might be Dreamweaver, but not WordPress. I edit my WordPress php files regularly - primarily just the theme files though. I comment throughout all my work too.

    I suppose a test for this would be to edit a php file in a text editor, then close it and open it back up in the same text editor. Then open the file up in Dreamweaver.

    You can download Notepad ++ to do this - http://notepad-plus-plus.org/

  6. dahliagraphics.dk
    Member
    Posted 2 years ago #

    But I am still at the starting lvl (noob lvl), so I haven't touched the php files, I'm just working in the html tab when I'm creating new pages.

  7. jeremyhawes
    Member
    Posted 2 years ago #

    I suppose what I was really suggesting is to make edits to any of the files you're suggesting with a text editor. There are essentially three general ways to make your edits in this situation:
    1 - Edit it with Dreamweaver's Design interface, which will add and remove spaces by it's own settings.
    2 - Edit it with Dreamweaver's Code interface, which should keep spaces and comment tags, but if not...
    3 - Edit it with another Text Editor (ie Notepad ++).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.