Viewing 6 replies - 1 through 6 (of 6 total)
  • No, I think is better to write your own css code to display images in menu. Plugin is good only for simple usage.

    Thread Starter ehoever

    (@ehoever)

    But it’s possible to change the image size, right? Wouldn’t it be quite simple to have something like height: 50px and width 100%?

    I’m not experienced enough to write that kind of css on my own unfortunately. Thanks though.

    You can run add_image_size('menu-h48', 9999, 48); with really big width and select this image size in menu item settings.

    Thread Starter ehoever

    (@ehoever)

    I think I did something wrong, so I removed the code. Where should I add it?

    Add it to functions.php in child theme:

    add_action('init', 'add_custom_image_sizes');
    
    function add_custom_image_sizes(){
      add_image_size('menu-h48', 9999, 48);
    }

    Thread Starter ehoever

    (@ehoever)

    Great, thanks so much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Only set height’ is closed to new replies.