Widget Question about WordPress

by D555 6 replies
Hi. I'm new to using WordPress. Is it possible to enter javascript
widget html code, on your main page between the <head> and the </head> tags
using WordPress ,or WordPress Editor? If so how could it be done?

Thanks.
#main internet marketing discussion forum #question #widget #wordpress
Avatar of Unregistered
  • Profile picture of the author Ouroboros
    What exactly are you trying to do?

    A lot of widget code for advertising and opt-in forms can be placed in your sidebar in a text box. Stuff like google analytics can be added in the header and footer pages using the theme editor.

    Tell us what you're trying to do, there are a lot of people in here familiar with WP.

    Steve
    Signature

    Need a Simple Product/Service to Market to Offline Clients? Sell Them DFY Custom Videos. https://www.fiverr.com/users/gigsiteguy

    {{ DiscussionBoard.errors[102200].message }}
    • Profile picture of the author D555
      yes, I'm trying to find a way of adding a JargonFish Widget
      to the main page. The instructions given are extremely thin.
      All it says is:

      To add JargonFish widget to your blog, simply insert the widget code in between the 'HEAD' tags on your webpage.

      Copy the JavaScript code from the "Get Code" page and paste it between the <head></head> tags on the pages you wish to display the JargonFish widget.

      I don't know how WordPress would allow you to do this.

      I've use the Theme Editor to add a few things to the side bar, but I don't think
      the instructions are referring to the side bar they point to the <head> </head> tags.

      Thanks.
      {{ DiscussionBoard.errors[102227].message }}
      • Profile picture of the author Ouroboros
        Yeah, what he said

        In the theme editor, bring up the header.php file.

        You'll see the tags in there and you just go in (preferably right before the /head tag) and put your cursor on the line above, hit enter, and then Ctrl V.

        If you're not used to this you might want to make a copy of the header.php file first. But if you pay attention to where you put the javascript, you can always delete it if it f@&ks something up.

        Steve
        Signature

        Need a Simple Product/Service to Market to Offline Clients? Sell Them DFY Custom Videos. https://www.fiverr.com/users/gigsiteguy

        {{ DiscussionBoard.errors[102268].message }}
      • Profile picture of the author D555
        Thanks Ouroboros and Jeff. You gave me the direction I was looking for.
        Making changes to the code is a little intimidating at first.
        The possibility of messing things up Royally weighs heavily on my mind.

        The good news is that the JargonFish Widget is installed.
        I tested it out and appears to be working.


        Thanks again. I learned something new.

        D555
        {{ DiscussionBoard.errors[102324].message }}
  • Profile picture of the author TheNightOwl
    Hi there D555

    Jeff's right. You need to go into your Theme Editor and play with the header template. Quick tip: Do a CTR+A, CTR+C jobbie and paste the existing code into TextPad or Notepad or something (Not Word or OpenOffice; a text editor) before you tinker.

    That way, if something goes wrong you can always just copy the original code back in "as-was" while you try again and/or find a solution--and your blog won't be broken in the meantime.

    I only say this because I don't know from your post how familiar you are with coding generally or php specifically, but php can be really finicky and "picky". LOL! For example, even adding an extra space after the closing php tag can make it not work.

    (Not that I'm a coder, incidentally, I've just learnt this exact point the hard way; that's why I'm mentioning it here).

    Best of luck with it!

    P.S. Ha ha! Ouroboros posted while I was punching this out!
    Signature
    {{ DiscussionBoard.errors[102285].message }}
Avatar of Unregistered

Trending Topics