
The admin part
This plugin lets you build a fully configurable dropdown field whose options act as links: when a visitor picks one, they are redirected to the matching URL. It was originally built for multisite networks to make navigation between subsites faster, but it now supports custom links as dropdown options too.
[dms_target] container on the same page, without leaving it.Once your settings are saved, display the dropdown with the [dms] shortcode or the bundled widget.
[dms] – Renders the dropdown exactly as configured on the admin settings page.
[dms_manual name=”” placeholder=”” target=”” options=””] – Renders a standalone dropdown that is independent of your saved settings. Accepts these attributes:
name – the dropdown label (leave empty for no label).placeholder – the first option shown in the menu (for example “– Select –“).target – “default” to open links in the same tab, or “blank” to open them in a new tab.options – comma-separated URL/name pairs in the form “url1|name1, url2|name2, url3|name3”. The order within each pair is detected automatically, so “name|url” works too. Option names cannot contain a comma or a vertical bar, as both are used to separate the values.Example:
[dms_manual name="Label" placeholder="--Select--" target="blank" options="https://duckduckgo.com|Trusted search engine, https://google.bg|Tracking search engine"]
[dms_target] – Marks the spot where the selected image is loaded. Place it anywhere on the same page as [dms] and set the behaviour to “Open in target section” on the settings page: choosing an option then swaps the image in this container instead of redirecting the visitor. If the behaviour is set to images but this shortcode is missing from the page, the dropdown shows a warning. Developers can also replace the container markup through the dms_target_filter filter.
Need extra functionality? Open an issue on GitHub or ask in the support forum, and I’ll see whether it can be added. Thanks to everyone who has shared ideas for improving this plugin.
Here are the filters you can use to modify the plugin’s output:
dms_sites_arguments – control the attributes passed to get_sites() when the “Show all sites in the WordPress Multisite Network” option is selected.dms_multisite_pairs – filter the results returned from get_sites().dms_users_sites – control the sites when the “Show only the sites where the user is registered” option is selected.dms_target_filter – replace the markup returned by the [dms_target] shortcode.