• How can I get rid of the nasty [to me, anyway] indentation that WP adds with tags like wp_get_archives() and others? I’ve removed most all my indentation because I didn’t like the way it was looking. I’d like to get to the bottom of this indentation as well.

    Yes, I know I must be some sort of freak among geeks to care this much about my source code, but I do.

Viewing 5 replies - 1 through 5 (of 5 total)
  • In View Source view ?
    I don’t think you can as it’s part of the way browsers interpret the code too.
    Drives me nuts as well – I hate indentation ??

        Hey.

            What’s wrong with indents?

    The indents are usually caused by <li> tags. Most of the “menubar” template tags output links as a list. Some let you override this through their parameters, and some would have to be circumvented through css.

    Thread Starter rsl

    (@rsl)

    I’ve looked in the PHP functions [in the wp-includes directory] and all I find are echo’ed variables. Does the indentation of an echo call affect the text echo’ed?

    podz, browsers ignore extraneous whitespace completely (like tabs and multiple spaces), and IE and FireFox (and probably all other browsers) display the source file exactly as it’s sent from the server – they don’t add tabs or spaces to the View Source.

    RSL, look for the PHP escaped tab command – it’s /t and will always be enclosed by quotation marks. Removing that slash-t command from echo commands and variables will remove the tabs. But I don’t recommend it.

    And while you are at it, look through all your template files too….. you’ll want to remove all the tabbing & spacing in there too…

    Tg

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘HTML source code question’ is closed to new replies.