{"id":3907142,"date":"2013-07-06T09:12:47","date_gmt":"2013-07-06T09:12:47","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/add-widget-to-a-page-dynamically\/"},"modified":"2016-08-21T02:41:06","modified_gmt":"2016-08-21T02:41:06","slug":"add-widget-to-a-page-dynamically","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/add-widget-to-a-page-dynamically\/","title":{"rendered":"Add widget to a page dynamically"},"content":{"rendered":"<p>Hello dear WP developers,<br \/>\nI am developing a widget that must be added to a page selected by the user dynamically. Well, I am not sure how to do this so I was thinking whether it would be a good idea if I create a filter plugin instead of a widget that would replace &lt;calculator-interface&gt; with the web form. Is this a good practice and will it work with all themes? Should I create put the interface in a different html file and replace &lt;calculator-interface&gt; with an iFrame that links to that file for cross theme compatibility or is there a way I can allow user to dynamically add widget inside a page. Whatever solution you suggest, please keep in mind that I do not have access to the clients WP so I have to do everything dynamically. I will just send a WP plugin and he will configure and add it to whatever page\/post(if possible or only page) he wants.<br \/>\nPlease go easy on me because I am new to WP-plugins and widget<\/p>\n<p>Thank You<\/p>\n","protected":false},"template":"","class_list":["post-3907142","topic","type-topic","status-closed","hentry","topic-tag-widget"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3907142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3907142\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3907142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}