css - adding the_custom_logo(); to header

i want to show logo on navbar section.the logo appears but i cant control it with css.<?php wp_head(); ?><nav

i want to show logo on navbar section.the logo appears but i cant control it with css.

        <?php wp_head(); ?>
<nav class="navbar navbar-expand-md navbar-light  sticky-top" style="background-color:rgb(3, 0, 180);" role="navigation">
  <div class="container" >
    <!-- Brand and toggle get grouped for better mobile display -->

    <a class="navbar-brand" href="#" > 
       <img src="<?php the_custom_logo(); ?>" height="42" width="42">



      </a>

i typed notes on screen picture:

.png

i want to show logo on navbar section.the logo appears but i cant control it with css.

        <?php wp_head(); ?>
<nav class="navbar navbar-expand-md navbar-light  sticky-top" style="background-color:rgb(3, 0, 180);" role="navigation">
  <div class="container" >
    <!-- Brand and toggle get grouped for better mobile display -->

    <a class="navbar-brand" href="#" > 
       <img src="<?php the_custom_logo(); ?>" height="42" width="42">



      </a>

i typed notes on screen picture:

https://i.ibb.co/w7rSkw3/11-A234233232ds-z.png

Share Improve this question asked Jul 3, 2019 at 13:02 Murat DenizMurat Deniz 77 bronze badges 2
  • Why is wp_head() there? That function needs to be inside the <head> element. – Jacob Peattie Commented Jul 3, 2019 at 13:10
  • @jacob thank you for this info – Murat Deniz Commented Jul 3, 2019 at 13:25
Add a comment  | 

1 Answer 1

Reset to default 1

The biggest issue you're running into is putting the_custom_logo() inside of an <img> tag. The function already outputs a full image tag, plus a link to the homepage wrapped around it. So, replace this

<a class="navbar-brand" href="#" > 
    <img src="<?php the_custom_logo(); ?>" height="42" width="42">
</a>

with this

<?php the_custom_logo(); ?>

to get rid of the first and third arrow in your screenshot.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745347895a4623648.html

相关推荐

  • css - adding the_custom_logo(); to header

    i want to show logo on navbar section.the logo appears but i cant control it with css.<?php wp_head(); ?><nav

    3小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信