• 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

Multilingual Hero Section

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 › Multilingual Hero Section

This topic is: not resolved

Tagged: authority pro

  • This topic has 1 reply, 2 voices, and was last updated 4 years, 8 months ago by Victor Font.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • September 27, 2018 at 6:45 pm #223429
    danielleB
    Participant

    I’m using the Authority Pro Hero Section landing page, and can’t figure out how to translate front page content to my second language. I use WPML to manage languages.

    I’d also like to style this section, but can’t find it in the theme’s CSS.

    Can anyone help?


    Danielle

    http://Belec.ca
    September 28, 2018 at 7:03 am #223432
    Victor Font
    Moderator

    The hero section in Authority Pro is built from content entered into the customizer. The custom values are stored in custom fields. The values of custom fields are displayed with the WordPress get_theme_mod function. https://codex.wordpress.org/get_theme_mod

    This WordPress function includes a filter that you can use to return different content than what is entered into the customizer. The syntax for the filter is:

    add_filter( "theme_mod_{$name}", $default );

    When you add your filters to the theme's functions.php, it should look something like this:

    add_filter( "theme_mod_authority-hero-title-text", "my_language_hero_title" );
    add_filter( "theme_mod_authority-hero-description-text", "my_language_hero_description" );
    add_filter( "theme_mod_authority-hero-caption-text", "my_language_hero_caption" );
    
    function my_language_hero_title( $title ) {
    	
    	$title = "title in my language";
    	
    	return $title;
    }
    
    function my_language_hero-description( $description ) {
    	
    	$description = "description in my language";
    	
    	return $description;
    }
    
    function my_language_hero-caption( $caption ) {
    	
    	$caption = "caption in my language";
    	
    	return $caption;
    }

    You'll have to figure out the language detection part, but this should at least get you started.


    Regards,

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

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

© 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