Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1344463
    Paul R
    Moderator

    Hi,

    It’s best to crop the images to your desired size using an image editor like photoshop before uploading it to your site.

    Thanks

    #1345050
    patrickg
    Participant

    The images were created at 1200×450. But obviously they aren’t appearing that way and something is distorting their quality. What should I be uploading at instead? Keep in mind that I don’t want to increase the height ratio if possible.

    #1345451
    Rad
    Moderator

    Hi there,

    You can stay with your preferred size, but let’s do this change first. Please add this code to your child theme’s functions.php

      function x_featured_image( $cropped = '' ) {
    
        $stack     = x_get_stack();
        $fullwidth = ( in_array( 'x-full-width-active', get_body_class() ) ) ? true : false;
    
        if ( has_post_thumbnail() ) {
    
          if ( $cropped == 'cropped' ) {
            if ( $fullwidth ) {
              $thumb = get_the_post_thumbnail( NULL, 'entry-cropped-fullwidth', NULL );
            } else {
              $thumb = get_the_post_thumbnail( NULL, 'entry-cropped', NULL );
            }
          } else {
            if ( $fullwidth ) {
              $thumb = get_the_post_thumbnail( NULL, 'entry-fullwidth', NULL );
            } else {
              $thumb = get_the_post_thumbnail( NULL, 'entry', NULL );
            }
          }
    
          switch ( is_singular() ) {
            case true:
              printf( '<div class="entry-thumb">%s</div>', get_the_post_thumbnail( NULL, 'full', NULL ) );
              break;
            case false:
              printf( '<a href="%1$s" class="entry-thumb" title="%2$s">%3$s</a>',
                esc_url( get_permalink() ),
                esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ),
                $thumb
              );
              break;
          }
    
        }
    
      }

    This should display the original image that you uploaded regardless of size.

    Thanks!

    #1346394
    patrickg
    Participant

    Fantastic! That did it. I haven’t been able to find any downsides from this adjustment but is there anything I should be worried about that the change would affect on posts from years ago?

    #1346534
    Joao
    Moderator

    Hi There,

    As long as the changes are made on your Child Theme there is nothing to worry about.

    Thanks

    Joao

    #1349937
    patrickg
    Participant

    I discoverd that somewhere along this thread the images stopped showing up on my blog page of the website. Here’s the link:

    https://www.bourbonbanter.com/bourbonblog/#.WI5uj7YrJR4

    Previously each post had an image, title and paragraph that I set in the post page itself. But now the featured image isn’t showing anymore.

    How do we restore the images to this page?

    #1350252
    Rad
    Moderator

    Hi there,

    It’s because of this code added to customizer’s custom javascript.

          (function($){
      $('.x-main .entry-featured').remove();
    })(jQuery);    

    Please remove it.

    Thanks!

    #1351324
    patrickg
    Participant

    I removed the code as directed but the images are not showing up yet: https://www.bourbonbanter.com/bourbonblog/#.WI-jWmQrJ-
    Any other recommendations?

    #1351808
    Christopher
    Moderator

    Hi there,

    Please find and remove this code from customizer :

    .x-main .entry-featured {
        display: none!important;
    }

    Hope it helps.

    #1353130
    patrickg
    Participant

    If I remove that code I wind up back with double header images on my blog posts.

    #1353335
    Paul R
    Moderator

    Hi,

    Please remove this code in your custom css as well.

    
    .x-main .entry-featured {
        display: none!important;
    }
    

    Thanks

    #1354103
    patrickg
    Participant

    Paul, that is the same instruction given by Christopher that I said created a double-header image on individual blog posts. (see attached). Removing it in the Customizer > Edit Global CSS fixes the blog feed page ( https://www.bourbonbanter.com/bourbonblog/#.WJIyo2QrKWY
    ) but creates double header images on individual post pages as illustrated in the attached.

    So my question is, how do we fix the feed page but not create double headers?

    #1354590
    Lely
    Moderator

    Hello There,

    Please update that CSS to this instead:

    body:not(.blog) .x-main .entry-featured {
        display: none!important;
    }

    That CSS will exclude the blog archive page but then hide the featured image on single post page.

    Hope this helps.

    #1355172
    patrickg
    Participant

    That seems to have done the trick. Thank you!

    #1355395
    Joao
    Moderator

    Glad to hear it,

    Cheers

  • <script> jQuery(function($){ $("#no-reply-1311799 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>