How to make a widget expand wider than the column width when editing its settings in the admin

This can be set by passing arguments to the $control_options of the parent widget constructor, which is the fourth argument. Here is an example constructor: class Custom_Widget extends WP_Widget { /** * Sets up the widgets name etc */ function __construct() { $widget_options = array( ‘description’ => __( ‘Featured Pages Widget.’, ‘affiliate’ ) ); $control_options … Read more

How to add a class to Tag cloud widget link?

You only want to add a class name based on the counts. Your above code looks like you may have copy/pasted from somewhere but you don’t need all that. I just tested this with wp_generate_tag_cloud_data (#L869) and wp_tag_cloud() and it’s working. Unfortunately for a basic test site like mine, the small count represents the largest … Read more

add_filter() function misunderstanding

add_filter ( string $tag, callable $function_to_add, int $priority = 10, int $accepted_args = 1 ) Hook a function or method to a specific filter action. WordPress offers filter hooks to allow plugins to modify various types of internal data at runtime. A plugin can modify data by binding a callback to a filter hook. When … Read more