Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Accepting Bids - jQuery for more Widget control in Admin Center WordPress


We're building a WordPress based platform for a specific industry with the goal of making it super-easy for them to manage their WordPress site. We'll have already set-up all of their plugins, ACF custom fields, CPT's, PHP functionality, etc so they just have to enter their content, choose the settings they want, and rearrange the Widgets as they'd like.

Having a problem though with keeping the widgets.php page clean in the admin center. There are some Widgets that can only be used on select Sidebars and some widget will have different settings based on whether its placed in the Footer Sidebar or not.

What we'd like is someone to help us with some jQuery that makes this cleaner. It should...

1) Prevent users from adding a Widget to a Sidebar that doesn't support it. We have that information in a global $setting array already, so can be pulled in when registering the jQuery via wp_localize_script so you have available in your jQuery script. The system should alert() a warning message if they try to add a Widget to an unsupported Sidebar and the system prevent the Widget from being added.

2) Add a class dynamically to each Widget like .is_footer or .is_not_footer - we can then hide the additional options via CSS as needed.

Tried to do this myself - but looks pretty complicated and jQuery isn't my strong suit. Let us know if you think you can make it happen and cost/timeline.



Answers (1)


Arnav Joy answers:

Hi ,

I have sent you PM, please check.