gdmaq_htmlfy_logo_img_style_attribute
This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!
Modify the style for the logo images added by the plugin. The filter ‘gdmaq_htmlfy_logo_img_style_attribute‘ has 2 arguments. Since the plugin has 2 logo places (header and footer), this filter is run twice for both logos.
Arguments
- $style: default CSS for the inline image styline is: ‘max-width: 100%; height: auto;’.
- $logo: which logo is filtered: primary or secondary.
Example
Remove the powered by message.
add_filter('gdmaq_htmlfy_logo_img_style_attribute', 'custom__gdmaq_htmlfy_logo_img_style_attribute', 10, 2); function custom__gdmaq_htmlfy_logo_img_style_attribute($style, $logo) { if ($logo == 'primary') { $style = 'width: 400px; height: 60px'; } else if ($logo == 'primary') { $style = 'width: 200px; height: 30px'; } return $style; }