• suekay

    (@suekay)


    HI, I hope someone can help me as this is rather puzzling.

    I need to add some HTML to my header. I have tried in various different places within the wp-content/themes/***/header.php file but it doesn’t show on the page.

    If I paste it right at the top of the header.php under <head>
    I can see the html momentarily then it disappears or is it hidden under the background??

    I’m using the twentyten template.

    Any help greatly appreciated.

    Thanks suekay

Viewing 11 replies - 1 through 11 (of 11 total)
  • Alwyn Botha

    (@123milliseconds)

    Link to site?

    Alwyn Botha

    (@123milliseconds)

    >>>If I paste it right at the top of the header.php under <head>

    Think I got it;

    HTML you want to display should be after <body> not in the HEAD

    Also, do not edit the twentyten theme…
    https://go.rvoodoo.com/WPchild
    explains it all, it will only cause you heartache!!

    Thread Starter suekay

    (@suekay)

    Thanks – I tried pasting under <body <?php body_class(); ?>>
    but still not seeing it. site is letmelearn.co.uk / blog

    Thread Starter suekay

    (@suekay)

    Thanks Voodoo, good tip. Once i figure out how to get this code to work I’ll make a child theme.

    Thread Starter suekay

    (@suekay)

    I’m wondering if it is the html code i have. It should display a table of colours to mouseover and change the background colour. It works fine in my html site. I tried adding just plain text to the header and I could see that fine.

    Alwyn Botha

    (@123milliseconds)

    You should not have that html and /html AGAIN

    it only goes – and currently EXISTS correctly right at the top and bottom of the document

    try pasting simple blablabal text in header.php – see if that displays; if OK ; then GOOD

    I agree with VOODOO; then learn about child themes; undo your change and apply it using a child theme;

    Learning one step at a time

    Alwyn Botha

    (@123milliseconds)

    >>>I tried adding just plain text to the header and I could see that fine.

    wow ; you posted that while I entered my long reply as well.

    Thread Starter suekay

    (@suekay)

    blablabla displays fine. But my other code doesn’t display still even though I have taken html and /html out

    Alwyn Botha

    (@123milliseconds)

    Error Line 44, Column 31: No space between attributes.

    <table border=”1″ align=”left”cellspacing=”0″ cellpadding=”4″ width=”100%”>

    simplify your other table to see where syntax error is

    many more errors at

    https://validator.w3.org/check?uri=http%3A%2F%2Fwww.letmelearn.co.uk%2Fblog%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

    Thread Starter suekay

    (@suekay)

    Thanks guys – the code is basically obsolete!!! I have some work to do lol! Thanks for your help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Adding HTML to header’ is closed to new replies.