Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #156048
    leonloberman
    Participant

    Currently, it defaults to use a 533 x 533px image in the Featured Content block – can this be changed to something else – for example, 533 x 333px? I prefer this sort of ratio.

    If I load media when another theme is in place, then only the following image sizes are created:

    Original
    1024×683
    150×150
    300×200
    768×350
    768×512

    Fotografie creates the following:
    1024×640
    1148×574
    150×150
    300×188
    50×50
    533×533
    640×640
    768×480
    864×800

    Thanks

    Leon

    #156139
    Mahesh
    Keymaster

    @leonloberman: For this you’ll need to create a child theme. You can use Generate Child Theme plugin to create the child theme. Then add the following code into functions.php
    add_image_size( 'fotografie-featured-custom', 533, 333, true );

    And create a file named components\features\featured-content\content-featured.php and add the code from the following url.
    https://bit.ly/2zXPKkV

    If you have any issue, let me know.

    Regards,
    Mahesh

    #156195
    leonloberman
    Participant

    Hi Mahesh

    Thanks – I can see that upon loading the media it creates a 533x333px thumbnail but it still seems to select the 533x533px.

    Should the content-featured.php file go in the child theme directory?

    Leon

    #156209
    leonloberman
    Participant

    Actually – it is selecting a 640x640px thumbnail …

    #156212
    leonloberman
    Participant

    Ok – resolved it (sort of).

    1) My mistake – I hadn’t built out the full directory structure for the content-featured.php file
    2) I have my site layout set to Fluid – so it wasn’t using the new thumbnail size anyway. If I change these lines:

    if ( ‘fluid’ === get_theme_mod( ‘fotografie_layout_type’ ) ) {
    $thumbnail = ‘fotografie-featured-fluid’;
    }

    to

    if ( ‘fluid’ === get_theme_mod( ‘fotografie_layout_type’ ) ) {
    $thumbnail = ‘fotografie-featured-custom’;
    }

    then it works – however I’m not sure what the impacts of doing this are? what’s the difference between Boxed and Fluid?

    Thanks

    Leon

    #156258
    Mahesh
    Keymaster

    @leonloberman: In the code that I’ve given, image of your desired dimension will be displayed in boxed layout. So please select boxed layout. But if you want it in both boxed and fluid, the changes you’ve made in the code as above will work.
    The difference between boxed and fluid layout is, boxed layout has max-width of 1600px and the content is displayed in the middle with certain space in left and right like boxed layout. And in fluid layout, has 100% width.

    Hope this clarifies you.

    Regards,
    Mahesh

    #156287
    leonloberman
    Participant

    Great – thank you.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Can I change the image size for Featured Content’ is closed to new replies.