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 |1 Answer
Reset to default 1The 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
wp_head()
there? That function needs to be inside the<head>
element. – Jacob Peattie Commented Jul 3, 2019 at 13:10