[Support request] Featured post image size vs other images

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Featured post image size vs other images

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #11820
    Daniel
    Participant

    For performance reason, I’ve set Images > Image width (px) to 400 in all my WP Show Posts category.

    However, when I want to use Columns > Featured post for a specific category, 400px feel too small so i bump it to 550px or more in order to have a bigger Feature post image. The downside of this approach is that now all my image are using more pixel and it affect negatively my performance.

    Is there any way to let all image to the 400px settings but to have a bigger setting for the Featured post image?

    #11825
    Tom
    Keymaster

    Hi there,

    We need to add an option for this.

    For now, maybe this will help?: https://wpshowposts.com/support/topic/weird-margin-on-list/#post-11659

    Let me know 🙂

    #11827
    Daniel
    Participant

    Hi,

    I added it to my code snippets plugin and it doesn’t work. Do you have an ETA on the option for setting a different size to the Featured post image?

    • This reply was modified 8 months, 1 week ago by Daniel.
    #11875
    Tom
    Keymaster

    Not at the moment – sorry! Can you link me to a page where I can check out a featured post? That code should work, so it might be something small we can tweak.

    Let me know 🙂

    #11878
    Daniel
    Participant

    The page is located at URL https://www.optionparent.com/

    There is 2 featured post, one under the “Poussettes” category, the other one is under the “Alimentation” category.

    #11933
    Tom
    Keymaster

    Can you try this?:

    add_filter( 'wpsp_image_attributes', function( $atts ) {
        // Set up our conditional
        if ( in_array( 'featured-column', get_post_class() ) ) {
            $atts[ 'width' ] = 1200;
            $atts[ 'height' ] = 400;
            $atts[ 'crop' ] = true;
        }
    
        // Return our options
        return $atts;
    } );
    #11941
    Daniel
    Participant

    I’ve got the following error when I hit the Save Changes button : syntax error, unexpected ‘&’

    #11962
    Tom
    Keymaster

    Hmm, I’m not seeing any issues with the code. Is there more to the error?

    #11984
    Daniel
    Participant

    Sorry, there was no error, only a bad copy paste from the notification email.

    I applied the code but featured image size doesn’t seem to have changed.

    #12007
    Tom
    Keymaster

    How are you applying the code?

    #12012
    Daniel
    Participant

    Yes, I can send you screenshots if you want.

    #12092
    Tom
    Keymaster

    Screenshots would be great – are you using a plugin to add the PHP?

    #12184
    Daniel
    Participant

    You can find the screenshot at this url. The plugin is “Code Snippets”.

    #12191
    Tom
    Keymaster

    Hmm, code looks good. What version of PHP is your server using?

    #12213
    Daniel
    Participant

    It uses the server default one, currently version PHP 7.1 (Siteground hosting).

Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.