When calling the logo that we personalize in wordpress, I do not apply style

1

I'm getting a template with materializecss, the problem comes when I decide to make the dynamic theme logo so that it can be changed from the same wordpress. Ok, the problem is that if I now want to put an id with the styles in the image or the image inside a div with said id, I do not apply those styles, directly in the element inspector is not displayed.

<body <?php body_class(); ?>>

    

        <a href="#!" class="brand-logo">

        <div id="logo">
            <img id="logo" alt=""><?php the_custom_logo(); ?></img>
        </div>
    <?php
        // Si no hay logo personalizado, solo mostrara el titulo de la pagina
        if (!has_custom_logo()) {
    ?>
            <h1><?php bloginfo('name'); ?></h1>
            <?php
        }
    ?></a>
    
asked by sergibarca 09.05.2017 в 03:14
source

1 answer

1

The IDs have to be unique on the page.

And you do not have to use an id for the image, this rule would suffice:

#logo img { 
   /* CSS */
}

Documentation: link

    
answered by 09.05.2017 / 20:45
source