programing

Manage widgets from page edit screen

magicmemo 2023. 3. 7. 21:15
반응형

Manage widgets from page edit screen

I'm looking to find a way to integrate the widget control area into the page edit screen. For the site I'm making it would be perfect with the same drag and drop functionality.

I want a list of the available widgets that I can drag and drop into the page widget area. The widgets will then only be shown on that particular page.

I've looked through the wp-admin/widgets.php file and tried to use some code from there. I even tried just including widgets.php at the end of the post.php (which is basically what I want, but of course gave me funny results). Please don't suggest plug-ins like Widget Context or Widget Logic. Those are my fallback if I cant do this :)

So I would like ideas and/or input on how to accomplish this. Preferably I'd like to do it in the functions.php file, or in a plug-in.

Edit: I'm still interested in this. Just a theoretical description on how to do this would be awesome :)

Let me apologize in advance, I don't have an answer for you but I do have a plugin suggestion that may be a better fall back than Widget Context or Widget Logic (this one lets you add the widget content from the "post edit" screen):

http://wordpress.org/extend/plugins/my-snippets/

Its a really old question but I don't think that you've got the right answer. I think the following plugin (not free) is closer for what you need. With this plugin you can manage the widgets from the page edit screen. Have fun!

Ultimate Widget Manager

ReferenceURL : https://stackoverflow.com/questions/2487969/manage-widgets-from-page-edit-screen

반응형