skip to Main Content

Custom Footer Callout Button HTML Attributes

The following snippet includes two examples showing how you can modify the footer callout button attributes and change it's class, id or any other attribute. This could be useful if you want to conditionally add/remove classes to the callout button so it looks differently for different parts of your site or perhaps add some custom data attributes that can be used for 3rd party integrations.

/**
 * Add custom classes to the footer callout button.
 *
 * @link https://total.wpexplorer.com/docs/snippets/footer-callout-button-attributes/
 */
add_filter( 'wpex_footer_callout_button_class', function( $class ) {
	$class[] = 'my-custom-class';
	return $class;
} );

/**
 * Modify the footer callout button attributes..
 *
 * @link https://total.wpexplorer.com/docs/snippets/footer-callout-button-attributes/
 */
add_filter( 'wpex_footer_callout_button_attributes', function( $attributes ) {
	$attributes[ 'data-something' ] = 'your data-something value';
	return $attributes;
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend Code Snippets)
Back To Top