-
AuthorPosts
-
January 23, 2016 at 11:58 pm #570635
Hey all, I’m simply trying to add this Amazon search code to my sidebar –
<script type=”text/javascript”>
amzn_assoc_placement = “adunit0”;
amzn_assoc_tracking_id = “djqcom-20”;
amzn_assoc_ad_mode = “search”;
amzn_assoc_ad_type = “smart”;
amzn_assoc_marketplace = “amazon”;
amzn_assoc_region = “US”;
amzn_assoc_textlinks = “”;
amzn_assoc_linkid = “dbe8dcb20702ababbfe5d012000022e1”;
amzn_assoc_default_search_phrase = “”;
</script>
<script src=”//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US”></script>It isn’t displaying though. I know script tags in the “Text” widget are an issue but plugins like
Javascript Html and Text Adder don’t help either. In this case should I edit Enfold’s sidebar.php file?January 24, 2016 at 3:50 am #570656Hey DJQuad!
You should be able to just add it to a text widget. That is the only code your supposed to use?
Regards,
ElliottJanuary 24, 2016 at 7:09 pm #570850Yes, I added this as a test. Note the -‘s I before and after:
–
<script type=”text/javascript”>
amzn_assoc_placement = “adunit0”;
amzn_assoc_tracking_id = “djqcom-20”;
amzn_assoc_ad_mode = “search”;
amzn_assoc_ad_type = “smart”;
amzn_assoc_marketplace = “amazon”;
amzn_assoc_region = “US”;
amzn_assoc_textlinks = “”;
amzn_assoc_linkid = “dbe8dcb20702ababbfe5d012000022e1”;
amzn_assoc_default_search_phrase = “”;
</script>
<script src=”//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US”></script>
–Here’s the rendered HTML:
<h3 class=”widgettitle”>Amazon Search</h3>
<div class=”textwidget”>-
<script type=”text/javascript”>
amzn_assoc_placement = “adunit0”;
amzn_assoc_tracking_id = “djqcom-20”;
amzn_assoc_ad_mode = “search”;
amzn_assoc_ad_type = “smart”;
amzn_assoc_marketplace = “amazon”;
amzn_assoc_region = “US”;
amzn_assoc_textlinks = “”;
amzn_assoc_linkid = “dbe8dcb20702ababbfe5d012000022e1”;
amzn_assoc_default_search_phrase = “”;
</script>
<script src=”//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US”></script>
-</div>You can see this on the sidebar at http://seriousgaming.tv.pd9hosting.com/amazon. The main content does contains the search box, but the sidebar does not.
January 25, 2016 at 8:32 am #571140Hi,
Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardJanuary 25, 2016 at 6:27 pm #571519Below. Thanks!
January 26, 2016 at 6:56 am #571910Hi,
Does amazon have any support for these kinds of matters? I think they would be able to help you out better to be honest. You’re getting this error on the page though:
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT http://z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US
Not sure why though unfortunately.
Best regards,
RikardJanuary 26, 2016 at 7:17 pm #572291No, they said to contact you. :(
January 28, 2016 at 2:31 am #573397Hi!
What happens in the default theme?
Regards,
ElliottJanuary 28, 2016 at 7:57 pm #574010It works with Twenty Fifteen.
January 30, 2016 at 9:09 am #574937Hi!
We tested the below code in the default theme the code is generating nothing this is not an issue with enfold theme.
please provide a screenshot of the working code so we can take a look at what the generated code look like on the default theme.You could also try some plugins related to Amazon https://wordpress.org/plugins/search.php?q=amazon+search please note that these plugins are not supported by enfold.
I believe this is incomplete or incorrect code.
<script type=”text/javascript”> amzn_assoc_placement = “adunit0”; amzn_assoc_tracking_id = “djqcom-20”; amzn_assoc_ad_mode = “search”; amzn_assoc_ad_type = “smart”; amzn_assoc_marketplace = “amazon”; amzn_assoc_region = “US”; amzn_assoc_textlinks = “”; amzn_assoc_linkid = “dbe8dcb20702ababbfe5d012000022e1”; amzn_assoc_default_search_phrase = “”; </script> <script src=”//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US”></script>
Best regards,
VinayFebruary 1, 2016 at 7:01 pm #575956p
- This reply was modified 8 years, 10 months ago by DJQuad.
February 1, 2016 at 7:03 pm #575959Here’s the search in Twenty Fifteen
Here’s it’s missing in Enfold
February 4, 2016 at 1:35 pm #577761Hey!
Do you have adblock or similar enabled by any chance?
Best regards,
JosueFebruary 4, 2016 at 7:42 pm #578006Nope, It’s disabled, and I see the ads.
February 8, 2016 at 1:43 pm #579596Hey!
unfortunately not every plugin and/or script is compatible with every theme. We can’t do much about it here, as it would require a huge amount of time to make it compatible for you. You would need to hire a freelance developer for this job.
Regards,
AndyFebruary 10, 2016 at 12:32 am #580669Since Enfold breaks a simple script and Twenty Fifteen does not, will hardcoding it in sidebar.php work?
February 10, 2016 at 2:54 am #580724For some reason the main search container is being hidden by CSS (when using Enfold) so i tried adding this to Quick CSS and the search bar is now visible:
div#amzn-native-ad-0 { display: block !important; width: 100% !important; }
Regards,
JosueFebruary 10, 2016 at 7:21 pm #581319It’s not displaying on the left sidebar under “AMAZON SEARCH” on http://seriousgaming.tv.pd9hosting.com/amazon
February 11, 2016 at 6:26 pm #581807Hey!
Try adding this code to the Quick CSS:
.amzn-native-container { display: block !important; width: 100% !important; }
Cheers!
JosueFebruary 14, 2016 at 6:55 pm #582981Getting closer! Under the search looks a little funky, like it’s not wide enough, even though it’s set to 100%.
February 15, 2016 at 5:36 am #583080Hi!
Yeah that part is a bit buggy, i’d suggest disabling the search contents with CSS as the search opens on a new window:
.amzn-native-content { display: none; }
Best regards,
JosueFebruary 15, 2016 at 7:01 pm #583694Looks like it will work. Thanks!
-
AuthorPosts
- The topic ‘Script tag in sidebar’ is closed to new replies.