Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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

    #1424851

    Hi 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,
    Nikko

    #1424870

    Hey 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

    #1424891

    Hi,

    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,
    Rikard

    #1424940

    Hi 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

    #1424942

    So 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?

    #1424948

    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.

    #1425010

    Hi 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,
    Nikko

    #1425018

    Hi 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

    #1425064

    Hi 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,
    Nikko

    #1425143

    Hi 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.

    https://lunabeylerian.com/wp-login.php?action=enter_recovery_mode&rm_token=HETmXA1jG0H9BzFPxH5SIM&rm_key=Pa1udPi9LDnORvkXhW41Vn

    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.33

    Error 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, 1 month ago by gb.
    #1425189

    Hi 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,
    Nikko

    #1425194

    Niko, Your support is top notch man! This is like white glove concierge-level help, thanks so much!!

    Very appreciated!

    GB

    #1425197

    Hi GB,

    Thanks for your kind words :)
    Thanks as well for using Enfold and have a great weekend!

    Best regards,
    Nikko

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘How to remove the blog image’ is closed to new replies.