How to add script into wordpress widget areas

staypositive

Supreme Member
Joined
Jul 28, 2015
Messages
1,434
Reaction score
226
Hi Pros and Gurus,


I wanted to know if anyone can share how to insert <script> links to wordpress widget area?

I know that i can add them in header.php areas after googling, however as i made a slideshow from CJ.com

thus, i wanna add the script into my widget area...

pls can anyone share?

my link is something like this below: ( hidden link )

<script type="text/javascript" language="javascript" src="http://www.xxxxxxxxxxxxxxxxxxxxxxxxx></script>


many thanks!! sorry if i posted in the wrong area..

i did tried to google and searched around but no hope..
 
hi thanks for ur reply

i have visual composer text widget and also blackstudio tiny mce, but after paste it wont show in widget..
 
It should show, add it into your text widget and click save as stated already by adorableseo. Also clean your browser cache, no reason not to work as that's what it is for
 
thanks both!

so sorry, but it just wont work :(

pls see attached what i did, appreciate any advice.
 

Attachments

  • z1.PNG
    z1.PNG
    33.9 KB · Views: 164
  • z2.PNG
    z2.PNG
    33.3 KB · Views: 154
The first thing to check is if your changes are getting reflected on your code.
Press Ctrl + U to see the source code of the site and see if your script tag is there.
If the script tag is on your source you will have to check your widget code.
 
Are you sure the address is correct, i'm getting no such site when looking on google. i just tried your code and got a blank widget. if the address is correct then there is no reason for it not to work.
 
If you are still facing an issue, do let me know.
I'll help you with skype sharing screen :)
It is hardly few minutes task :D
 
hi all.. i thank you so much for all u guys spending time to educate / share with me.

however... it is still not working, i tried using raw JS in visual composer, cleared cache, it will make a empty area like attached in pics.

z1.PNG z2.PNG z3.PNG
 
Are you sure the address is correct, i'm getting no such site when looking on google. i just tried your code and got a blank widget. if the address is correct then there is no reason for it not to work.


the address is direct copy from cj.com create widget area...
 
You can try plugins like header & footer or image widget plugins

Both should do the job. There are more plugins like widget optimizer etc, just give an hour of trial and error
 
You can try plugins like header & footer or image widget plugins

Both should do the job. There are more plugins like widget optimizer etc, just give an hour of trial and error
sir.

tried image widget.. but its image, how can i incorp the <script>?
 

Attachments

  • z4.PNG
    z4.PNG
    17 KB · Views: 138
If the code is correct and you added it to the text widget then there is no reason why It shouldn't work. Get another code from amazon for example a banner code and enter it in your text widget and see if that happens
 
I know you stumbled with question, does it requires any header script to be attached in order to work?
 
I know you stumbled with question, does it requires any header script to be attached in order to work?
hi

cj.com didnt say so

i just copy the code from it and paste
 

Attachments

  • z1.PNG
    z1.PNG
    81.9 KB · Views: 155
Back
Top