Community Forums › Forums › Archived Forums › General Discussion › Breakthrough Pro: How to remove the hero title while keeping hero image
Tagged: Breakthrough Pro, Front Page Image 1, hero title
- This topic has 7 replies, 3 voices, and was last updated 5 years, 4 months ago by Genesis Developer.
-
AuthorPosts
-
July 18, 2019 at 12:41 am #492410yoongmingMember
Hi,
This is my first time posting - very pleased to meet you all. I just started a blog and I am totally new to website design and blogging.
I would like to remove the hero section's title i.e. work, play, live, thrive
Under Appearance > Customize, then going to the hero section settings tab, I left the Hero Title section as <blank>. While this removes the hero title from the site, it also inadvertently removes the hero section image. I would like to keep the image, I just would like to remove the title. Does anyone have a solution / recommendation?
Thank you in advance.
Thank you,
https://urbanitewarrior.com/
YMJuly 18, 2019 at 12:53 am #492411Brad DaltonParticipantLink to the page/post in question please where you want to remove the title.
July 18, 2019 at 2:16 am #492413yoongmingMemberHi Brad,
Thank you in advance. The page in question is my front page. urbanitewarrior.com
Best regards,
YMJuly 18, 2019 at 2:38 am #492414Brad DaltonParticipantWhich image does it remove?
When i remove the Hero Title, the Front Page Image 1 remains.
July 18, 2019 at 3:04 am #492417yoongmingMemberIt removes the hero image - front page image 1. the one with the Petronas Twin Towers.
The image is there on the live editor, but when I hit publish, it disappears. I've tried it now, if you navigate to my site now you will see what I mean.
July 18, 2019 at 3:37 am #492418Brad DaltonParticipantYes, you are right. You will need to modify the code in the lib > templates > hero.php file so the section still displays when the title is removed.
July 18, 2019 at 4:01 am #492419yoongmingMemberThanks. I am guessing it's this part of the code right?
// Sets up hero section content. $title = get_theme_mod( 'breakthrough_hero_title_text', breakthrough_get_default_hero_title_text() ); $button_text = get_theme_mod( 'breakthrough_hero_button_text', breakthrough_get_default_hero_button_text() ); $button_url = get_theme_mod( 'breakthrough_hero_button_url', '#' ); $hero_image = get_theme_mod( 'breakthrough_front_page_image_1', breakthrough_get_default_front_page_image_1() ); $hero = get_theme_mod( 'breakthrough_show_hero_section', true ); if ( $hero ) { if ( $title || is_active_sidebar( 'hero-section' ) ) { // Opens the hero-section markup. genesis_markup( array( 'open' => '<div %s><div class="wrap">', 'context' => 'hero-section', ) ); if ( $title ) { echo '<h2 class="hero-title">' . $title . '</h2>'; } if ( $button_text ) { echo '<a href="' . $button_url . '" class="button button-hero">' . $button_text . '</a>'; } $front_page_image_1 = get_theme_mod( 'breakthrough_front_page_image_1', breakthrough_get_default_front_page_image_1() ); if ( $front_page_image_1 ) { $image_id = attachment_url_to_postid( $front_page_image_1 ); $image_alt = get_post_meta( $image_id, '_wp_attachment_image_alt', true ); echo '<div class="full-width-image"><img src="' . $front_page_image_1 . '" alt="' . $image_alt . '" /></div>';
How do edit it? Any idea?
July 22, 2019 at 11:10 pm #492493Genesis DeveloperMemberReplace this line
if ( $title || is_active_sidebar( 'hero-section' ) ) {
with
if ( is_active_sidebar( 'hero-section' ) ) {
Next go to
1. Appearance->Widgets page
2. Drag&drop the text/or HTML widget at Hero section sidebar
3. Save the widget without any contentHope that it will work.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.