• 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

A two colour Site Title

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 › General Discussion › A two colour Site Title

This topic is: not resolved
  • This topic has 4 replies, 3 voices, and was last updated 13 years, 5 months ago by wpsmith.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • December 27, 2012 at 5:42 pm #7791
    kategorgeous
    Member

    Hello there and Happy belated Christmas ...

    I would like my main site title to be two colours ie the first word in purple and then the next word in brown.

    Is it possible?

    Thanks

    Kate


    http://www.underbrella.co.uk
    Learn from yesterday, live for today, hope for tomorrow

    December 27, 2012 at 9:38 pm #7830
    willyr
    Participant

    Kate, I suspect you can do it with html, but wouldn't it be easier to create a graphic with the title coloured as you see fit, and then use that graphic as a title?

    If you go to your Appearance tab on the left, and then click on the header link from the menu, you can see how you can upload a graphic for the header.

    Then, see the code snippets to remove the existing header graphic, if necessary.

    Hope this helps.

    Cheers,

    Bill

    http://www.all-about-ottawa.com
    http://www.incredible-kingston.com
    http://www.fix-my-compressor.com

    December 28, 2012 at 9:12 am #7888
    wpsmith
    Member

    Yes, you can do this. I had to this for a client site back not too long ago. You can do this one of two ways:

    First, you can filter what's already there:

    add_filter( 'genesis_seo_title', 'wps_seo_title', 10, 3 );
    /**
    * Modify the Genesis SEO Title.
    *
    * @param string $title Default HTML title output.
    * @param string $inside HTML blog name output.
    * @param string $wrap h1 or p based on settings.
    * @return string $title Modified HTML title output.
    */
    function wps_seo_title( $title, $inside, $wrap ) {
    // do something using <span> tags to manipulate your colors
    return $title;
    }

    Second, remove the Genesis default and roll your own. Doing it this way will render the Homepage Settings in the SEO Settings pointless unless you build in the same logic.

    remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
    add_action( 'genesis_site_title', 'wps_seo_site_title' );
    /**
    * Echo the site title into the header.
    */
    function wps_seo_site_title() {
    //do something, output some HTML
    }


    Travis Smith | Recommended StudioPress Developer & Contributor
    WP Smith | @wp_smith | GitHub

    Due to the forums, please paste code using Pastebin, JS Fiddle (for JavaScript) or GitHub.
    How to use Firebug for Designers by SixRevisions

    December 28, 2012 at 3:13 pm #7998
    kategorgeous
    Member

    Huge thanks but ooh heavens that sounds a bit complicated! How about I make the site title blank in the settings and set up a heading with Simple Hooks?

    Would you be able to send me the link to the site that you managed to achieve the two colour HTML effect? Thank you


    http://www.underbrella.co.uk
    Learn from yesterday, live for today, hope for tomorrow

    December 28, 2012 at 3:23 pm #8006
    wpsmith
    Member

    I would recommend the first approach. The site that I did this on has changed to an image logo since the launch of the site not worrying about the SEO of their site name.

    So here's basically what I did:

    add_filter( 'genesis_seo_title', 'wps_seo_title', 10, 3 );
    /**
    * Modify the Genesis SEO Title.
    *
    * @param string $title Default HTML title output.
    * @param string $inside HTML blog name output.
    * @param string $wrap h1 or p based on settings.
    * @return string Modified HTML title output.
    */
    function wps_seo_title( $title, $inside, $wrap ) {
    return sprintf( '<h1 id="title"><span class="color1">%s</span><span class="color2">%s</span></h1>', 'text for color 1', 'text for color 2'  );
    }


    Travis Smith | Recommended StudioPress Developer & Contributor
    WP Smith | @wp_smith | GitHub

    Due to the forums, please paste code using Pastebin, JS Fiddle (for JavaScript) or GitHub.
    How to use Firebug for Designers by SixRevisions

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ 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

© 2026 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