Here is How to iframe Google Trends in WordPress Dashboard Widget for Plugin Development or Own Usage Using Our Easy Dashboard Plugin. Our easy WordPress dashboard plugin means this one. At least even if you 100% new user, you can install that plugin.
iframe Google Trends in WordPress Dashboard Widget
It is mandatory to read our old guide and install the plugin. Read that linked guide rightly. We actually wrote about how to embed Google Trends in WordPress posts before. That was bit difficult. This is easy because it is simple iframing the stuff.
Actually you can directly do it from WordPress using the WordPress Plugin Editor, URL will be like this :
---
1 | http://example.org/wp-admin/plugin-editor.php |
From the dropdown, select Example Dashboard Widget
if you are using our default WordPress plugin. If you have changed the name, that will be the name. Click the select button. The file which you’ll edit is :
1 | example_dashboard_widget/widget.php |
Just simple editing of a plugin file. Now go to Google Trends and either create your own graph or select some other ready to use graph. You will get the >
sign to click and get the code for iframe :
1 | <script type="text/javascript" src="//www.google.com/trends/embed.js?hl=en-US&cmpt=q&q=Moto+G&date=1/2014+12m&geo=IN&tz&content=1&cid=GEO_TABLE_0_0&export=5&w=500&h=330"></script> |
Copy it and paste it on editing pane of WordPress plugin after this line :
1 2 3 4 5 6 | <?php /** * This file could be used to catch submitted form data. When using a non-configuration * view to save form data, remember to use some kind of identifying field in your form. */ ?> |
Possibly you want to see how it looks :
Delete the old default line below it; it will look bizarre if the default example are showing up. You are not distributing the plugin, so practically there is no need to have any configuration. Editing is configuration.
Tagged With google trend search widget wordpress , google trends graph iframe , iframe html google trends