WordPress.org

Ready to get started?Download WordPress

Forums

Duplicate Widget with new settings? (2 posts)

  1. mr_adamson
    Member
    Posted 4 years ago #

    Hello.

    I have created a widget that allows me to show the latest posts in a blog.
    In the wp-admin is asks for the blog id, title, a template the data is to be printed out in and the number of posts to show. I have managed to get this working with one blog but wondered if it would be possible to allow the widget to be dropped into another side bar and change its setting to show the posts from a different blog and use a different template.

    I have seen the plugin here (http://www.lancelhoff.com/wordpress-duplicate-sidebar-widgets/) which allows me to duplicate it and drag it onto another sidebar but it doesn't allow me to change the settings.

    Can anyone help.

    Thank you.

  2. s_ha_dum
    Member
    Posted 4 years ago #

    I have managed to get this working with one blog but wondered if it would be possible to allow the widget to be dropped into another side bar and change its setting to show the posts from a different blog and use a different template.

    What do you mean? Change its settings according to which sidebar its on?

    Based on your post, I'm guessing that you are not using the new widget API. You wouldn't need 'wordpress-duplicate-sidebar-widgets' if you were. The new API allows for multiple sidebars internally. My suggestion is to port your widget to that API. You can then drag your widget to a second sidebar and change its settings to fit. You can even dynamically switch settings according to sidebar, on both the admin screen and front end.

Topic Closed

This topic has been closed to new replies.

About this Topic