• 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

Infinity-pro: adding an image to custom html widget in the front-page-4 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 › Design Tips and Tricks › Infinity-pro: adding an image to custom html widget in the front-page-4 section

This topic is: not resolved

Tagged: adding an image, custom html widget, front page 4, Infinity Pro

  • This topic has 0 replies, 1 voice, and was last updated 6 years, 6 months ago by cKBOOTH.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • December 20, 2018 at 11:06 pm #225184
    cKBOOTH
    Member

    Hi
    I have customised the front-page-4 section to include an image (rather than a font icon) and added two buttons after the text. The following seems to work OK (using local WAMP server on PC).

    <div class="content-box">
    <img src="http://pagebuild.test/wp-content/uploads/2018/12/ah-moy.jpg"
    class="cottage-image" alt="Ah Moy two-bedroom cottage at Tin Dragon Cotages"
    style="max-width: 100%; height: auto; margin-bottom: 0.5rem;">
    <h4>Ah Moy</h4>
    <p>Overlooking the river, this two-bedroom cottage with disabled access is suitable for two couples.</p>
    <p style="color: #1e2601;font-weight:600;">From AU$340 - $480 for 2 nights</p>
    <p>Book NowSee More</p>
    </div>

    But adding a srcset of different-sized images, seems to fail (latest version of Chrome). Only the default image is being used--even after deleting the cache and resizing my screen. When I use this code, the image appears on larger screens, but if I first load my WP site onto a small screen, there are no images displayed. Increasing the screensize sees the images appear.

    <img src="http://pagebuild.test/wp-content/uploads/2018/12/settlers-hut.jpg"
    class="cottage-image" alt="External view of the Settlers Hut in the bush at Tin
    Dragon Cotages in Tasmania" style="max-width: 100%; height: auto;"

    srcset="http://pagebuild.test/wp-content/uploads/2018/12/settlers-hut.jpg-1026x684.jpg 1026w,
    http://pagebuild.test/wp-content/uploads/2018/12/settlers-hut.jpg-300x200.jpg 300w,
    http://pagebuild.test/wp-content/uploads/2018/12/settlers-hut.jpg-768x512.jpg 768w,
    http://pagebuild.test/wp-content/uploads/2018/12/settlers-hut.jpg 1026w">

    Thank you if you can explain this, and/give me some advice!

    Regards
    Christine

    https://www.tindragontrailcottages.com.au/
  • Author
    Posts
Viewing 1 post (of 1 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

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