/    Sign up×
Community /Pin to ProfileBookmark

Two instances of Javascript not working in different Divs

Hello all

As an author at *************, I got two scripts (for me & my pen name), I need to put in two different Footer Widgets on my wordpress site homepage.

But either only one appears fully formatted omitting the next one, or both appear unformatted revealing the []sections.

I tried renaming the divs as div-1 and div-2, and named the widgets as widget-1 and widget-2, but no success.

<div id=”*************-widget-1″></div>

<!– Place this script before the closing </body> tag –>
<script type=”text/javascript” src=”http://*************.com/js/widget.v2.js”></script>
<script type=”text/javascript”>
*
**
**********Widget({
“id”: “*
**
**********-widget-1″,
“author”: 1212121,
“bio”: 1,
“category”: null,
“articles”: 10,
“width”: 250,
“height”: 178,
“theme”: {
“shell”: {
“background”: “#2F83C4”,
“text”: “#ffffff”
},
“article”: {
“background”: “#ffffff”,
“text”: “#333333”
},
“links”: “#215F8F”
}
});
</script>

AND

<!– Place this tag where you want the widget to render –>
<div id=”*************-widget-2″></div>

<!– Place this script before the closing </body> tag –>
<script type=”text/javascript” src=”http://*************.com/js/widget.v2.js”></script>
<script type=”text/javascript”>
*
**
**********Widget({
“id”: “*
**
**********-widget-2″,
“author”: 131313,
“bio”: 0,
“category”: null,
“articles”: 10,
“width”: 250,
“height”: 210,
“theme”: {
“shell”: {
“background”: “#2F83C4”,
“text”: “#ffffff”
},
“article”: {
“background”: “#ffffff”,
“text”: “#333333”
},
“links”: “#215F8F”
}
});
</script>

Any ideas how to go about it?

I have changed my author numbers for privacy.

Thanks in advance.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Ghitorni spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...