Home » Docs » Hooks » Actions » Class: Conductor_Widget » conductor_widget_display_content

Description

This action can be used to output data for all Conductor Widgets. It can also be used to add or remove output data for specific Conductor Widgets (see example below). By default, upon instantiation, the Conductor_Widget_Query class hooks into conductor_widget_display_content_{$widget_number} to display data. The conductor_widget_display_content action is executed before the individual/specific (widget number) Conductor Widget display content hook.

Note: To output data for individual/specific Conductor Widgets see the conductor_widget_display_content_{$widget_number} documentation page.

This action is executed when the Conductor_Widget::widget() function is called (when a Conductor Widget is displayed, after the query is initialized).

Technical Details

  • Type: Action
  • Parameters:
    • $post (WP_Post): The WP_Post object for the current post
    • $instance (array): The Conductor Widget instance (settings)
    • $widget(Conductor_Widget): The Conductor Widget instance
    • $conductor_widget_query (Conductor_Widget_query): The Conductor Widget Query instance

Resources

Examples

The following example removes the featured image output element from the conductor_widget_display_content_{$widget_number} hook based on the current post ID.

The following example outputs data before all Conductor Widgets.