• Resolved cerrajeros

    (@cerrajeros)


    Hi,

    I need to remove the link from the main image of the header in the pages, but not in the categories or in the home. It’s possible?

    • This topic was modified 6 years, 5 months ago by cerrajeros.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    I need to remove the link from the main image of the header in the pages

    I’m not sure what link you mean, do you mean header button?

    Kind Regards, Roman.

    Thread Starter cerrajeros

    (@cerrajeros)

    of the header logo,sorry (My English is very bad) 🙂

    Hello, please check this topic:
    https://wordpress.org/support/topic/remove-link-from-the_custom_logo/

    Kind Regards, Roman.

    Thread Starter cerrajeros

    (@cerrajeros)

    Thanks @romanbon but in the header.php I don’t have the code for that topic, the one I have is this:

    <?php if ( get_theme_mod('site_logo') ) : ?>
    					<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php bloginfo('name'); ?>"><img class="site-logo" src="<?php echo esc_url(get_theme_mod('site_logo')); ?>" alt="<?php bloginfo('name'); ?>" /></a>
    					<?php if ( is_home() && !is_front_page() ) : ?>
    						<h1 class="site-title screen-reader-text"><?php bloginfo( 'name' ); ?></h1>
    					<?php endif; ?>
    • This reply was modified 6 years, 4 months ago by cerrajeros.

    Hello, you can try to replace this row:

    <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php bloginfo('name'); ?>"><img class="site-logo" src="<?php echo esc_url(get_theme_mod('site_logo')); ?>" alt="<?php bloginfo('name'); ?>" /></a>

    …with this:

    <a title="<?php bloginfo('name'); ?>"><img class="site-logo" src="<?php echo esc_url(get_theme_mod('site_logo')); ?>" alt="<?php bloginfo('name'); ?>" /></a>

    Please note that you have to override the modified header.php file in a child theme if you don’t want to repeat this modification after each theme update.

    Kind Regards, Roman.

    Thread Starter cerrajeros

    (@cerrajeros)

    Thanks!!!!

    You are welcome! 🙂

    Kind Regards, Roman.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Delete link from image header’ is closed to new replies.