Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #158432
    Rob J
    Participant

    Hey,

    I am trying to get the logo to link, not to the homepage, but a different page in the website.

    I know this is strange and silly, but can you help? Is there some custom code I can add to create a different link on the logo?

    Thanks

    #158671
    Nabeel A
    Moderator

    Hey Rob,

    Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    #162509
    Rob J
    Participant

    Hey,

    Thanks for the reply, I just want to change the link of the logo. Currently, the logo in the header automatically links to the homepage.

    I just want to know if I can set the logo to link to a custom page I have built.

    Thanks

    #162766
    John Ezra
    Member

    Hey there,

    Yes you can do this, however it will require you to edit a file.

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Once you have that, please follow this guide. (note since I don’t have your URL I can’t see what stack you are using so the example will be for integrity stack, it will be similar for the icon, renew, and ethos)

    Step 1: Find the “_brand.php” file in the X main theme files. It is located here:

    /wp-content/themes/x/framework/views/global/_brand.php

    Step 2: copy the file and paste it in the exact directory path of your child theme. (note this is necessary so X will see your changes and use them. your path should look like this for integrity light.

    /wp-content/themes/x-child-integrity-light/framework/views/global/_brand.php

    Note: This will be the same for the other child themes, the only thing that changes is the child theme name:
    x-child-integrity-light (used above)
    x-child-integrity-dark
    x-child-renew
    x-child-icon
    x-child-ethos

    Step 3:Make your change to the href=”” value to point to your desired URL.

    Change the following….

    <a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
      <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
    </a>

    to:

    <a href="http://www.YourLinkHere.com" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
      <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
    </a>

    Save and you should be good to go.

    Hope this helps!

    #887128
    Oekosys
    Participant

    Thanks man!

    #887588
    Rupok
    Member

    You are welcome @oekosys

  • <script> jQuery(function($){ $("#no-reply-158432 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>