How do I change homepage link (/) to an external link to another site in this code?
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" class="site-title site-logo-text" <?php echo esc_attr( $header_text_color ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a>
CodePudding user response:
<a href="YOUR_OTHER_LINK_HERE" rel="home" class="site-title site-logo-text" <?php echo esc_attr( $header_text_color ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a>
CodePudding user response:
If you have fixed url for the external link, you don't have to put it inside
Just put it inside the href attribute like so and that should do it
CodePudding user response:
If you want that link to point to another (external) resource, then make it simple, remove the unnecessary PHP code and put the URI in the href
attribute. As I put HTTPS://EXAMPLE.COM/
below.
<a href="HTTPS://EXAMPLE.COM/" rel="home" class="site-title site-logo-text" <?php echo esc_attr( $header_text_color ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a>