Jump to content
welcome

Can't add weather widget

Recommended Posts

welcome+    2
welcome

Hi,

I am trying to add a weather widget inside a box, but am unable to.  I notice that since an upgrade the tab is listed as "text" whereas before it was "HTML" I believe.  Does this have something to do with it?

 

What I have attempted to do is copy and past the snippet into the box under text.  In the past i was able to add google maps, this way.

Thanks

  • Like 1

Share this post


Link to post
Share on other sites
welcome+    2
welcome

I tried one from weather.com. I also tried adding google translate to my site. One was a script, one started with div. Thanks

Share this post


Link to post
Share on other sites
welcome+    2
welcome

Hi 

This is for google translate

 

<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, gaTrack: true, gaId: 'UA-28091179-2'}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
        
This for weather

Share this post


Link to post
Share on other sites
welcome+    2
welcome

HI,

Any follow up on my questions?

Thanks

Share this post


Link to post
Share on other sites
James B    436
James B

Hi there, I've pasted the weather widget into a page and it's displaying, but its all over the place. The html view has been relabeled text but it will still be the same as before. I think the problem is that wordpress 3.5 had a massive jquery update and this script doesn't seem to be performing as it should inside. You might need to check with the source of the code.

 

The google translate code would have to be added as a hook, you could do this using the hooker plugin http://www.pagelines.com/store/plugins/hooker/ all you would do is select the required location from the drop down and then insert the code.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
Rob    547
Rob

I don't think you can add that code in a box.

 

Rather, I think you can add it to a box created by the WP Boxer plugin, since that uses Content Blocks in place of boxes (which are custom post types).

 

There may be different ways to approach this too. Most of the Google Translate code can be placed, essentially in Dashboard > PageLines > Site Options > Custom Code in the Headerscripts area. The last bit,

 

<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

 

Can be placed in the content block in HTML mode.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×