• 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

Add a background link to Genesis Widget Background

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 › Add a background link to Genesis Widget Background

This topic is: not resolved

Tagged: background image, genesis, Genesis Widget Background, link, widget

  • This topic has 1 reply, 2 voices, and was last updated 2 years, 9 months ago by Susan.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • May 12, 2017 at 8:34 pm #206366
    David Borrink
    Participant

    I'm using Genesis Widget Background for a widgetized front page. The link of the title which appears over the full background image is the link to the page. My client would like to have the full background image be the link to the page, especially for mobile.

    Good idea. So I'm trying to modify the code to do that.

    The existing code uses an "article" class to wrap the background image and content. I need to bring in the link to this area. Here is the opening array that starts the block:

    genesis_markup( array(
    	'html5'   => '<article class="image-section fixed" style="background-image:url(' . $image . ')"><div class="hook-img-fix">',
    	'xhtml'   => sprintf( '<div class="%s">', implode( ' ', get_post_class() ) ),
    	'context' => 'entry',
    				) );

    What follows is the page content section.

    Then, the array to complete the block

    genesis_markup( array(
    	'html5' => '</div></article>',
    	'xhtml' => '</div></div>',
    			) );

    I tried to bring in <a> . get_permalink . immediately before the <article> opening tag, and added a couple </a> at the end after the </article> and </div> tags, thinking I would be essentially wrapping the whole <article> in a link.

    That gave me a text URL which appeared to the left of my widget, pushing the first widget to the right. The link was not active. So I'm sort of heading in the right direction, as it did use the widget's URL, but not as an active link and not wrapping my widget background.

    http://Development on MAMP
    June 29, 2020 at 12:34 pm #499716
    Susan
    Moderator

    I’m going to close this thread, as it is very old and unanswered. I am hoping that you were able to find your solution in the meantime.

    As a reminder, this is a community forum, manned by volunteers, so not all posts will be responded to.

    In the meantime, if you haven’t already done so, I recommend joining the #GenesisWP Slack community: https://genesiswp.slack.com

    Or the #GenesisWP Facebook group: https://www.facebook.com/groups/genesiswp/

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Add a background link to Genesis Widget Background’ is closed to new 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