• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Canging News Pro custom header link

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Canging News Pro custom header link

This topic is: not resolved

Tagged: header link, News Pro

  • This topic has 3 replies, 2 voices, and was last updated 10 years ago by styzer.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • October 12, 2015 at 9:00 pm #167989
    styzer
    Participant

    Hi, I am in a bit of trouble: I changed the header image and don't remember how to modify the URL, which should lead to an external site. I tried a few snippets that are said to do this, but it didn't work...

    //* Modify the header URL
    add_filter( 'genesis_seo_title', 'sp_seo_title', 10, 3 );
    function sp_seo_title($title, $inside, $wrap) {
      $inside = sprintf( '<a href="http://vi-control.net/community" title="%s">%s</a>', esc_attr( get_bloginfo('name') ), get_bloginfo('name') );
      $title  = sprintf( '<%s class="site-title" itemprop="headline">%s</%s>', $wrap, $inside, $wrap );
      
      return $title;
    }

    Anyone can direct me to a solution?

    Much appreciated,

    Site: http://vi-control.net/portal

    Andre

    http://vi-control.net/portal
    October 13, 2015 at 1:06 am #168006
    Brad Dalton
    Participant

    Your code works on XHTML themes

    Use this 2nd snippet for HTML 5 themes

    http://my.studiopress.com/snippets/header/


    Tutorials for StudioPress Themes.

    October 13, 2015 at 2:19 am #168009
    styzer
    Participant

    Hi Brad,

    OK, so I have used both XHTML and HTML5 snippets.

    //* Modify the header URL - HTML5 Version
    add_filter( 'genesis_seo_title', 'child_header_title', 10, 3 );
    function child_header_title( $title, $inside, $wrap ) {
        $inside = sprintf( '<a href="http://www.vi-control.net/community" title="%s">%s</a>', esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
        return sprintf( '<%1$s class="site-title">%2$s</%1$s>', $wrap, $inside );
    }
    
    //* Modify the header URL - XHTML Version
    add_filter('genesis_seo_title', 'sp_seo_title', 10, 3);
    function sp_seo_title($title, $inside, $wrap) {
    	$inside = sprintf( '<a href="http://www.vi-control.net/community" title="%s">%s</a>', esc_attr( get_bloginfo('name') ), get_bloginfo('name') );
    	$title = sprintf('<%s id="title">%s</%s>', $wrap, $inside, $wrap);
    	return $title;
    }
    

    However, now the header isn't showing... I refreshed many times... what could be the cause then?

    Home BB

    Thank you!

    October 13, 2015 at 2:40 am #168010
    styzer
    Participant

    OK, Brad, it''s working now.

    Changes I made: left the paragraph break before the "return" tags, and took out the www in the URL. Not sure if that did anything but now the header is showing here.

    Many thanks! 🙂

    //* Modify the header URL
    add_filter( 'genesis_seo_title', 'sp_seo_title', 10, 3 );
    function sp_seo_title($title, $inside, $wrap) {
      $inside = sprintf( '<a href="http://vi-control.net/community" title="%s">%s</a>', esc_attr( get_bloginfo('name') ), get_bloginfo('name') );
      $title  = sprintf( '<%s class="site-title" itemprop="headline">%s</%s>', $wrap, $inside, $wrap );
      
      return $title;
    }
    
    //* Modify the header URL - HTML5 Version
    add_filter( 'genesis_seo_title', 'child_header_title', 10, 3 );
    function child_header_title( $title, $inside, $wrap ) {
        $inside = sprintf( '<a href="http://vi-control.net/community" title="%s">%s</a>', esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
     
        return sprintf( '<%1$s class="site-title">%2$s</%1$s>', $wrap, $inside );
    }
  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble