-
AuthorPosts
-
November 6, 2023 at 9:13 pm #1424832
Hi,
Not sure which settings to adjust with the following issue involving the blog layout. The featured image is automatically applied to the top of the post, however, it is cropped, not the full image.Below is a link to see the issue, there are two posts, click either and see that the featured image is added into the post automatically but is cropped.
So I have to add the image in the post.
How do I get it so the cropped image is not added?
Thanks,
GB
November 7, 2023 at 3:23 am #1424851Hi GB,
The post page is set to use either one of the image sizes: entry_with_sidebar or entry_without_sidebar.
In your case it’s entry_without_sidebar which is using 1210px width and 423px height, to make the height adjust based on the width, please try to add this code in your child theme’s functions.php file:function enfold_customization_modify_thumb_size( $size ) { $size['entry_without_sidebar'] = array( 'width' => 1210 ); return $size; } add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );
And re-upload the image or regenerate images (using a plugin).
Hope it helps.Best regards,
NikkoNovember 7, 2023 at 6:59 am #1424870Hey Nikko,
Thanks so much for the support. I wish I knew what to do with that code, lol.
Sorry, really not sure where to cut and paste that.
GB
November 7, 2023 at 9:58 am #1424891Hi,
Please try to add it to your child themes functions.php file.
please try to add this code in your child theme’s functions.php file
Best regards,
RikardNovember 7, 2023 at 5:19 pm #1424940Hi Rikard,
As I mentioned above, I have not added code to a child theme functions php file before.
I have only used the Quick CSS option.
Could you point me to instructions on how to do this. The one I found gave a big warning that I could break the theme so I want to do it properly.
I also do not mind giving admin privileges,
Thanks,
GB
November 7, 2023 at 5:33 pm #1424942So I found some instructions and pasted the code. Then removed the featured image. I cleared the cache and re added the featured image for the blog post and the same issue persists.
Take a look at the link here:
You will see that the blog post image on the blog page looks correct but when you click on the post, the image added to the post is cropped, which is not what we want for a photo portfolio site.
Any ideas what’s going on here?
November 7, 2023 at 6:15 pm #1424948What I would like to have happen is that when a blog post is being created and an image is added to the “Featured Image” that it does not automatically add a cropped version of that image into the blog post.
November 8, 2023 at 5:40 pm #1425010Hi gb,
Can you give us temporary admin access? so we can check further.
What I would like to have happen is that when a blog post is being created and an image is added to the “Featured Image” that it does not automatically add a cropped version of that image into the blog post.
Yes, I believe that is what the code is for.
Best regards,
NikkoNovember 8, 2023 at 6:12 pm #1425018Hi Niko,
Sure , below is the admin access. BTW, I added the function code you suggested, in case you need to remove or change it?
Thanks!
GB
November 9, 2023 at 4:39 am #1425064Hi gb,
Thanks for giving us admin access.
I have removed the code from functions-enfold.php and installed WP Code plugin in your site and add the code there, then re-uploaded the featured image and it worked properly.
Please review your site.Best regards,
NikkoNovember 9, 2023 at 5:02 pm #1425143Hi Nikko,
Thanks so much Nikko, that’s amazing support!
Two more questions, not big deals but I wonder if its possible:
1. The date of the post is placed at the bottom of the post, Can it be placed at the top of the post?
2. The post image highlights when the mouse hovers over and is clickable to enlarge. Which is unnecessary, can that be turned off?
Thanks again for the excellent support!
GB
PS – I just noticed this email from WordPress saying a plugin is causing a fatal error. It seems like it arrived around the same time as the code plugin was added. However when I go to the site, I do not see an issue? What do you think?
Here is the email:
Howdy!
WordPress has a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
In this case, WordPress caught an error with one of your plugins, WPCode Lite.
First, visit your website (https://lunabeylerian.com/) and check for any visible issues. Next, visit the page where the error was caught (https://lunabeylerian.com/wp-admin/admin.php?page=wpcode-snippet-manager&snippet_id=2519) and check for any visible issues.
Please contact your host for assistance with investigating this issue further.
If your site appears broken and you can’t access your dashboard normally, WordPress now has a special “recovery mode”. This lets you safely login to your dashboard and investigate further.
To keep your site safe, this link will expire in 1 day. Don’t worry about that, though: a new link will be emailed to you if the error occurs again after it expires.
When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.4
Active theme: Enfold (version 5.6.6)
Current plugin: WPCode Lite (version 2.1.5)
PHP version 7.4.33Error Details
=============
An error of type E_COMPILE_ERROR was caused in line 1 of the file /home/gregoryb/public_html/lunabeylerian.com/wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php(287) : eval()’d code. Error message: Cannot redeclare enfold_customization_modify_thumb_size() (previously declared in /home/gregoryb/public_html/lunabeylerian.com/wp-content/themes/enfold/functions-enfold.php:2660)- This reply was modified 1 year ago by gb.
November 10, 2023 at 4:12 am #1425189Hi gb,
1. The date of the post is placed at the bottom of the post, Can it be placed at the top of the post?
I have added this code in WP Code to move the post date on the top:function move_postmeta(){ ?> <script> window.addEventListener('load', function() { var postMetaInfos = document.querySelector('.single-post .post-meta-infos'); var featuredImage = document.querySelector('.big-preview'); if (postMetaInfos && featuredImage) { featuredImage.parentNode.insertBefore(postMetaInfos, featuredImage); } }); </script> <?php } add_action('wp_footer', 'move_postmeta');
Then to adjust the styling, I added this CSS code in Quick CSS:
#top.single-post #main .big-preview { margin-top: 0; } #top.single-post #main .post-meta-infos { float: none; font-size: 1em; margin-top: 0; }
2. The post image highlights when the mouse hovers over and is clickable to enlarge. Which is unnecessary, can that be turned off?
Yes, I added this CSS code in Quick CSS:#top.single-post #main .big-preview a { pointer-events: none; }
As for the error, it occured when I inserted the code to modify the image size, since it was already declared in functions-enfold.php, but it’s already fixed.
Best regards,
NikkoNovember 10, 2023 at 5:48 am #1425194Niko, Your support is top notch man! This is like white glove concierge-level help, thanks so much!!
Very appreciated!
GB
November 10, 2023 at 7:58 am #1425197Hi GB,
Thanks for your kind words :)
Thanks as well for using Enfold and have a great weekend!Best regards,
Nikko -
AuthorPosts
- The topic ‘How to remove the blog image’ is closed to new replies.