• 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

How to achieve different content width for images and text in Metro Pro

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 › How to achieve different content width for images and text in Metro Pro

This topic is: resolved

Tagged: Full Width Images, full-width content layout, Metro Pro

  • This topic has 5 replies, 2 voices, and was last updated 9 years ago by hn345.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • November 10, 2014 at 11:05 am #131082
    hn345
    Member

    Hello, I'm new here. Building my first website, an online publication, using Metro Pro.

    I'm using the content-sidebar as the default layout for individual blog posts, which typically have a heading, followed by a byline, a large photo and then the article (which may have charts inserted as images). However, for some individual blog posts I'd like to initially use the full-width layout, if it can be modified to show a reduced content width for the article text. I.e. the post heading and photo should be full-width (ideally site-container width, though that's not critical) and the article text and any charts something like 750px width. This is the type of effect I'm after:

    Can anyone suggest how that could be accomplished?

    Thanks in advance.

    November 10, 2014 at 11:38 pm #131157
    Brad Dalton
    Participant

    You could create a custom layout

    Or use the single post filter http://codex.wordpress.org/Plugin_API/Filter_Reference/single_template

    Another option would be to use a custom body class


    Tutorials for StudioPress Themes.

    November 14, 2014 at 9:29 am #131509
    hn345
    Member

    Hi Brad,

    Thanks so much for responding and giving me the options. The custom body class concept seemed easiest to implement. Managed to do it via a Studiopress code snippet to functions.php (my very first conditional tag!) and some styling to the pre-media queries section of style.css. It worked beautifully! But the celebrations were short lived, because the changes messed up the site on media screens! Now trying to figure out how to rectify those problems. Added some new code to the media queries sections, but it's not perfect. Metro Pro is beautifully responsive on all my media screens and I hate to mess with that.

    Two new questions:
    1) Is there a simple way to exclude media screens in the conditional tag? Ideally, would have something like:

    If ( is_single() AND has_tag() AND..."is not a media screen"...

    2) Generally speaking, after adding a new custom body class to a theme, is there a simple way to restore the original responsive settings in style.css, or would it require extensive coding in the media queries sections?

    My site is not yet live, so can't give you the address. If you need it to help me with Q2, we'll have to wait a week or so, when I should be ready to go live with a basic version of the website.

    Thanks,
    h

    November 15, 2014 at 3:13 pm #131659
    hn345
    Member

    I think I've fixed the issue using CSS code, but I'd still like to know if it's possible to exclude media screens with a simple conditional tag (or filter)? I'm waiting till I've tested all the code before marking this as resolved.

    November 15, 2014 at 3:46 pm #131668
    Brad Dalton
    Participant

    You can exclude different screen sizes using a mobile conditional tag or CSS Media Queries but i don't have the specific code to do this at this point in time.


    Tutorials for StudioPress Themes.

    November 16, 2014 at 4:49 pm #131778
    hn345
    Member

    Thanks, Brad. I googled "mobile conditional tag" and came across a couple of very helpful tutorials on wpsites.net on the subject! I have seen many of your tutorials in recent months and found them useful.

    At this point I'm going to stick with the CSS changes I made, because they seem to be working. I'll revisit the mobile conditional tag if there are any problems with specific devices.

    Thanks again, and best regards.

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