• 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

Lifestyle Pro: Possible to have 2 fonts in 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 › Design Tips and Tricks › Lifestyle Pro: Possible to have 2 fonts in Title?

This topic is: not resolved

Tagged: css, font, lifestyle Pro

  • This topic has 8 replies, 2 voices, and was last updated 5 years, 2 months ago by Asephra.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • December 26, 2017 at 12:27 pm #214814
    Asephra
    Member

    Hi everyone,

    I'm currently using Lifestyle Pro, and in the Site Title, I want to use 2 different fonts (Allura + Playfair Display)

    Is there a way to do this?

    Right now, it's only allowing me 1 in the CSS and I don't see an option to edit HTML.

    Thank you for any assistance!
    Alice

    http://yoursalutations.com
    December 26, 2017 at 1:28 pm #214815
    Victor Font
    Moderator

    You can, but it requires using the genesis_seo_title filter in functions.php. This is a shell that you can add to the bottom of functions.php. You'll have to figure out the HTML yourself since you have the site hidden behind a coming soon page.

    add_filter( 'genesis_seo_title', 'my_custom_title' );
    function my_custom_title( $title ) {
    
        $title = "Create my custom html here";
    
        return $title;
    }

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    December 26, 2017 at 6:22 pm #214824
    Asephra
    Member

    Hi there Victor, thank you very much for your reply. I've disabled the Coming Soon page to reveal the site in progress.

    Do you know what I can do, if there is no area to access the functions.php in my WordPress Dashboard?

    Under Appearance, there is only Edit CSS. I don't see any "Theme Files" or "Theme Functions" to choose from.

    December 26, 2017 at 10:05 pm #214825
    Victor Font
    Moderator

    Access the site through ftp and edit the file locally.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    December 31, 2017 at 3:18 pm #215000
    Asephra
    Member

    Hi there Victor,

    I connected the site to an FTP (Filezilla)

    And tried editing the functions.php by adding this to the very bottom:

    add_filter( 'genesis_seo_title', 'my_custom_title' );
    function my_custom_title( $title ) {
    
        $title = "<h1 class=“site title”>Your <span style="font-family: Playfair Display;">Sal</span>utations</h1>;
    
        return $title;
    }

    And in the Edit CSS section, I kept this:

    .site-title {
        font-family: 'Allura' !important;
    }

    However, when I re-saved the Functions.php with the newly added snippet, the site "broke" and produced an error.

    Do you know what I did wrong in the snippet?

    Thanks!

    January 1, 2018 at 7:36 am #215016
    Victor Font
    Moderator

    Yes, your quote marks are wrong when building your $title string. You always have to use straight quotes with PHP. You have curly quotes wrapping site title. When you have double quotes in the string itself, you're outer quotes have to be single quotes. You start the string with a double quote and have double quotes in the string. You also didn't terminate the string with the closing quote. The corrected string is below.

    $title = '<h1 class="site title">Your <span style="font-family: Playfair Display;">Sal</span>utations</h1>';


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    January 1, 2018 at 1:00 pm #215023
    Asephra
    Member

    Hi Victor, thank you that worked great 🙂

    I was able to get the 2 fonts in 1 site title via this:

    $title = '<h1 class="site title"><span style="font-family: Allura; font-size: 30pt;">Your</span> <span style="font-family: Playfair Display;">SAL</span><span style="font-family: Allura; font-size: 30pt;">utations!</span></h1>';

    Do you know how I can get that to appear on mobile as well?

    Thank you so very much for your help thus far!

    January 2, 2018 at 8:43 am #215037
    Victor Font
    Moderator

    Use your browser's built-in inspect tool and mobile device simulator to examine the mobile CSS and adjust it accordingly in the media queries.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    January 4, 2018 at 11:58 pm #215111
    Asephra
    Member

    Hi there Victor,

    Thank you again for your help. I realized that having 2 fonts in the Site Title doesn't appear correctly in different environments (it looked great on my desktop, but it got stripped on my laptop etc) so I made it into an image instead.

    add_filter( 'genesis_seo_title', 'my_custom_title' );
    function my_custom_title( $title ) {
    
        $title = '<img src="http://yoursalutations.com/wp-content/uploads/2018/01/Your-Salutations-logo-500x102.png">';
    
        return $title;
    }

    My new problem is that when on an actual mobile device, the image is TOO small but it looks fine when I toggle on Chrome Inspect and view under various devices.

    Do you know why that is?

    And how to adjust the image to make it bigger on mobile?

    Is it still the Additional CSS using something along the lines of

     @media only screen and (max-width: 640px) 
    [enter missing HTML]

    Thank you so much.

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 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

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