• 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

Only landscape image on Single Post ? (Executive 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 › Design Tips and Tricks › Only landscape image on Single Post ? (Executive Pro)

This topic is: resolved

Tagged: single post image

  • This topic has 2 replies, 2 voices, and was last updated 11 years, 11 months ago by Toon61.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • July 26, 2014 at 3:28 am #115903
    Toon61
    Member

    Hi all,
    I'm working on a website for one of my clients, and they want to show landscape or portrait pictures on a single post.
    In the functions.php there is a line that says:

    //* Add new image size for display on single post page
    add_image_size( 'singular', 680, 350, TRUE );

    This always results in a (more or less cropped) landscape image, no matter what the original file orientation is.
    How can I change this to differentiate between landscape and portrait, so there is a 'add_image_size' for landscape and one for portrait.
    All suggestions are welcome.

    July 26, 2014 at 2:22 pm #115926
    Brad Dalton
    Participant

    You can add 2 sizes but that doesn't guarantee your images will look perfect.

    What you need to do is crop them before uploadling.

    Another option is to use the new 4th parameter for image crop position http://codex.wordpress.org/Function_Reference/add_image_size


    Tutorials for StudioPress Themes.

    July 27, 2014 at 4:18 am #115960
    Toon61
    Member

    Brad,

    Thank you for pointing me (again) in the right direction.
    After reading about the settings on the WP Codex pages, i came up with this simple solution:
    add_image_size( 'singular', 650 );
    I removed the Height and Crop parameters, so now all images will be resized (scaled) to a fixed width (650px in this case), no matter if they are landscape or portrait orientated.

  • 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

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