Archived

This topic is now archived and is closed to further replies.

  • 0

Can't add weather widget

Question

Posted · Report post

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

1 person likes this

Share this post


Link to post
Share on other sites

7 answers to this question

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

HI,

Any follow up on my questions?

Thanks

Share this post


Link to post
Share on other sites

Posted · Report post

What code does this weather widget require?

Share this post


Link to post
Share on other sites

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

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

Posted · Report post

Can you please paste the code for the Weather widget here?

Share this post


Link to post
Share on other sites

Posted · Report post

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