Code in <head> section of wordpress

by 10 replies
14
is there a way of entering code into the <head> in wordpress without causing the body to be spaced down the page?

i'm attempting to enter a code but everytime i do, it shifts the body text down about 2 or 3 spaces. how can i solve this issue?
#website design #&lthead&gt #<head> #code #section #wordpress
  • are you placing your code using appearances->theme->editor and then going to the header.php file and placing your code in there?

    If so, its possible the code you are adding has some sort of spaces inserted into it.

    Have you tried placing it at the bottom of the <head> section just before </head> ??
  • You must be doing it incorrectly - code in the <head> section of an HTML document (WordPress or anything that generates HTML) is not displayed and thus will not affect anything in the <body> section.

    Do a "View Source" on your outputted page and you should spot the error.

    Bill
  • I actually am trying to enter the code on a specific page in wordpress. Is there a way for me to put the code for just one page in the head section and how do I find the head section for each page?
    • [1] reply
    • The header shows up for every page. Edit it for one, you've done it for all. I'm pretty sure anyway.
      • [1] reply
  • bump for anyone else who can help out
    • [1] reply
    • You can find the page ID of a WordPress page by looking at the address bar of your browser while editing the page in the WordPress dashboard ... it should look something like .../wp-admin/post.php?post=233&action=edit ...

      The page ID is the number right after post=

      Another way to easily identify page ID's is to install the pageMash WordPress plugin (do a google search for "pagemash plugin").

      Once you activate the pagemash plugin, the settings page for that plugin identifies all of your page ID's. (There are also other WordPress plugins that you can install to reveal page ID's, but pagemash has other useful features as well, like making it easy to re-order your pages and "hide" certain pages from being visible.)

Next Topics on Trending Feed

  • 14

    is there a way of entering code into the <head> in wordpress without causing the body to be spaced down the page? i'm attempting to enter a code but everytime i do, it shifts the body text down about 2 or 3 spaces. how can i solve this issue?