Support

Account

Home Forums ACF PRO WYWIWYG Widget Block/Background Image Field Reply To: WYWIWYG Widget Block/Background Image Field

  • This is just a guess, so I’m not sure if it will do you any good. Basically you need to alter the widget arguments for ‘before_widget’ and ‘after_widget’ based on the custom field. Like most widgets, where are no hooks in the widget itself to make these changes https://plugins.svn.wordpress.org/wysiwyg-widgets/trunk/includes/class-widget.php.

    The closest I’ve been able to find is this WP hook https://developer.wordpress.org/reference/hooks/dynamic_sidebar_params/. From looking at it I’m guessing that $params contains information on all of the widgets that are in the sidebar, but again, this is just a guess. If the guess is correct you could loop through all of the widgets, find the right ones, get your custom field value and then modify the before and after widget arguments to include your container div with the background image.