Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript.

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;
}
0
0
586
Rate this reference

You are not allowed to rate this post.

Comments

Leave a Reply