fbpx

Need Help?

Here are some good places you cant start.

Join the Community

Whats New?

Get updated about all the good stuff!

Modify dropdown items with PHP

To modify dropdown items in php, open the dropdown or multiselect attribute in widget creator, and add PHP Filter Name. For example: “mydropdown”

Then go to functions.php and put this php code:

				
					function setMyDropdownItems($options){
	
	$options["My Item"] = "my_item";
	
	return($options);
}

add_filter("ue_modify_dropdown_mydropdown","setMyDropdownItems");

				
			

The “ue_modify_dropdown_”

is the prefix, then you add your filter name “mydropdown” in this case.

In result – the additional item will be added to the dropdown in Elementor:

Download is just a click away

Get instant access to tons of Elementor goodies, completely FREE!

Hurray!

You got FREE access to the worlds leading widgets for Elementor page builder!