• Resolved cadfile

    (@cadfile)


    This going to sound strange but I have various plugins and a manual function that adds stuff to the header when it renders. All is good unless something important gets pasted on the same line as a comment then it seems to be ignored like the comment. How can I force items to start on a new line when being added to the theme files like the header

    Here a link to some code as an example:
    http://pastebin.com/wfTZ7aDW

    I want to force my function that adds the tags to always start on a new line.

    Yes I can use a plugin but I want to control this myself with a function

Viewing 1 replies (of 1 total)
  • Thread Starter cadfile

    (@cadfile)

    Figured my issue out. I wasn’t getting how to get my function to force a new line and figured out that I needed to put in a PHP declaration so here is the line I added to my function:

    <?php echo "\n<!-- my comment -->\n"; ?>

    That worked. It dropped down to the next line, wrote the comment, then dropped another line before writing the rest of the text in the function.

Viewing 1 replies (of 1 total)
  • The topic ‘How can I force new lines in the header.php file’ is closed to new replies.