• 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

Academy Pro hero button: target="_blank"

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 › Academy Pro hero button: target="_blank"

This topic is: not resolved

Tagged: academy pro, hero section

  • This topic has 2 replies, 2 voices, and was last updated 3 years, 3 months ago by stefaanoyen.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • December 5, 2019 at 5:43 am #495265
    stefaanoyen
    Member

    Hi there,

    On the Academy Pro theme, the only way to define the URL of the Hero Colored Button is through the customizer. I want this URL to open on a new page, but I can only enter the URL, not the a attribute target="_blank".

    How and where do I do this? I looked into the 'customize.php' file, but my knowledge of PHP is too limited : )

    Thanks for helping out!
    Stefaan

    https://www.jouwhuisjouwsite.be/
    December 5, 2019 at 6:44 am #495267
    Brad Dalton
    Participant

    In hero-section.php find this code around line 74

    	
    if ( $button_primary_text ) {
    		echo '<a href="' .esc_html( $button_primary_url ) . '">' . $button_primary_text . '</a>';
    }
    
    if ( $button_secondary_text ) {
    		echo '<a href="' .esc_html( $button_secondary_url ) . '">' . $button_secondary_text . '</a>';
    }
    

    Tutorials for StudioPress Themes.

    December 5, 2019 at 7:22 am #495268
    stefaanoyen
    Member

    Hi Brad, that did the trick! Thank you so much 🙂

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