Widget ID function
-
Can you consider adding this function in so we can easily identify what our widget ID is…
add_action('in_widget_form', 'spice_get_widget_id'); function spice_get_widget_id($widget_instance) { if ($widget_instance->number=="__i__"){ echo "<p><strong>Widget ID is</strong>: Pls save the widget first!</p>" ; } else { echo "<p><strong>Widget ID is: </strong>" .$widget_instance->id. "</p>"; } }
thanks to https://www.ads-software.com/plugins/get-widget-id/
https://www.ads-software.com/plugins/amr-shortcode-any-widget/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Widget ID function’ is closed to new replies.