-
AuthorPosts
-
April 25, 2023 at 1:33 pm #1405513
Bei mir erscheinen die Beitragsbilder sehr groß, seit ich das Theme verwende.
Wie kann ich die Bildgröße für die Beitragsbilder so einstellen, dass das komplette Bild angezeigt wird?
April 26, 2023 at 7:02 am #1405655Hey mwuehle,
Thank you for the inquiry.
To adjust the size of the featured image or display the full-size version, you can add this code to the functions.php file.
add_action('after_setup_theme', function() { global $avia_config; $avia_config['image_size'] = 'full'; }, 10, 1);
Best regards,
IsmaelApril 26, 2023 at 12:45 pm #1405694Hi Ismael,
I added to functions.php in the enfold-child as suggested, but it doesn’t work.Take a look at this post as an example: https://www.nachhaltigkeit-management.de/eu-taxonomie-was-ist-das/
The post image is 871 x 975 pixels in the original. It is cropped at the top and bottom. I want it to be displayed completely and also not so big.
Do you have an idea how to do that?
Best regards, Michael
April 27, 2023 at 10:16 am #1405793Hi,
Thank you for the update.
If the modification above is not working, please override the themes/enfold/includes/loop-index.php template file and look for this code around line 93.
$size = strpos( $blog_style, 'big' ) ? ( ( strpos( $current_post['post_layout'], 'sidebar' ) !== false ) ? 'entry_with_sidebar' : 'entry_without_sidebar' ) : 'square';
Replace the code with:
$size = strpos( $blog_style, 'big' ) ? ( ( strpos( $current_post['post_layout'], 'sidebar' ) !== false ) ? 'full' : 'full' ) : 'square';
Best regards,
IsmaelApril 30, 2023 at 10:29 am #1406035The image will now no longer be cut off. So that works. Thanks a lot!
In the mobile browser the image is also displayed as I imagine it. But in desktop the blog images look way too big.
I would like to limit to a maximum resolution, for example 300 x 300 pixel.Is that possible somehow?
April 30, 2023 at 12:29 pm #1406041Hi,
If you want your single post images to have a max-width of 300px and be centered try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:#top.single-post .fullsize .template-blog .big-preview img { max-width: 300px; margin: auto; }
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
After applying the css, please clear your browser cache and check.Best regards,
MikeMay 11, 2023 at 4:24 pm #1407123Thank you so much, that’s exactly how I wanted it!
May 11, 2023 at 5:38 pm #1407134Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Größe des Beitragsbilds’ is closed to new replies.