Answer the question
In order to leave comments, you need to log in
WordPress | How to uniqueize widget selectors?
Good evening.
There are wrappers
<div id> и <span class> и <a href> в register_sidebar
<div id="%1$s"> и <div id="wgid">
. But the uniqueness never happens. Answer the question
In order to leave comments, you need to log in
In the screenshot, id="widget-13_text-5" is the WordPress generated id, which means you have the 13th widget, the 5th type of text widget. If you need to modify, make your own widget:
class My_Text_Widged extends WP_Widget {
function __construct() {
parent::__construct(
'my_widget_id', // ID виджета
__('Widget Title', 'text_domain'), // Name
array( 'description' => __( 'My Widget', 'text_domain' ), ) // Args
);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question