Viewing 13 replies - 1 through 13 (of 13 total)
  • You can’t do this through the theme. You’d have to code it, I guess.

    Thread Starter JPSKILLZ

    (@jpskillz)

    Any idea on how to do that or does that have to be done by the Theme Creator?

    You don’t need the theme creator to do it; you can do it yourself. I guess by editing the php for the header, but I don’t know how.

    However, why do you want to do this? It’s now pretty much a de facto standard that clicking a logo takes you to the home page of a site. If you change this behaviour it may annoy your users or, worse, make them think that there is something suspicious going on.

    Thread Starter JPSKILLZ

    (@jpskillz)

    I agree 100% but it’s what my client wants so, LoL. I started with the Header PHP, but I was playing with the code and the site went blank once so I’m just trying to see if I can find exactly what I’m looking for before messing something up.

    Try this:
    Move class-main-header.php into your child theme so:

    customizr

    customizr-child
    –parts (create with New Folder)
    class-main-header.php

    Line 125 (before):
    <h1><a class="site-logo" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name' , 'display' ) ); ?> | <?php bloginfo( 'description' ); ?>"><img src="<?php echo $logo_src ?>" alt="<?php _e( 'Back Home' , 'customizr' ); ?>" <?php echo $logo_img_style ?>/></a>

    Line 125 (after)
    <h1><a class="site-logo" href="https://mysite.com" target="_blank" title="<?php echo esc_attr( get_bloginfo( 'name' , 'display' ) ); ?> | <?php bloginfo( 'description' ); ?>"><img src="<?php echo $logo_src ?>" alt="<?php _e( 'Back Home' , 'customizr' ); ?>" <?php echo $logo_img_style ?>/></a>

    (Think is very close to what you need!)

    Line 125 (before):
    <h1><a class="site-logo" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name' , 'display' ) ); ?> | <?php bloginfo( 'description' ); ?>"><img src="<?php echo $logo_src ?>" alt="<?php _e( 'Back Home' , 'customizr' ); ?>" <?php echo $logo_img_style ?>/></a>

    Line 125 (after)
    <h1><a class="site-logo" href="https://mysite.com" target="_blank" title="<?php echo esc_attr( get_bloginfo( 'name' , 'display' ) ); ?> | <?php bloginfo( 'description' ); ?>"><img src="<?php echo $logo_src ?>" alt="<?php _e( 'Back Home' , 'customizr' ); ?>" <?php echo $logo_img_style ?>/></a>

    Sorry, my backticks have gone awry!

    Remove target="_blank" to avoid a new Page.

    (Sorry all my backticks went awry)

    Thread Starter JPSKILLZ

    (@jpskillz)

    Can I test the code via the Child Them Editor on site or do I have to create a new file within the PHP?

    Thread Starter JPSKILLZ

    (@jpskillz)

    And which ones are supposed to be the backticks?

    Thread Starter JPSKILLZ

    (@jpskillz)

    Oh, do the backticks just make the code pop-up in that little window?

    Sorry, the backticks is this Forum and puts shade around code so forget about that.

    Sounds like you need to look at Child Themes first so read this:
    https://managewp.com/how-to-create-a-child-theme

    You’re going to take a copy of the customizr file, and then edit the copy so you don’t spoil the original file. You store it in the Child Theme directory customizr-child/parts.

    Have a go, I’ll be here again tomorrow.

    Thread Starter JPSKILLZ

    (@jpskillz)

    YOU FOUND THE RIGHTY LINE! ALL THAT NEEDS TO CHANGE IS THE:
    href=”https://mysite.com&#8221; target=”_blank” title=”<?
    TO
    href=”https://www.mysite.com&#8221; title=”etc. etc.

    THANKS AGAIN!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Link Logo?’ is closed to new replies.