Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1090522
    StephenMepsted
    Participant

    Hi there – using X – Ethos theme and loving it. However I find the featured image takes up a lot of space in posts and understand that it must be included in order to show in the post carousel and slider and in blog listings etc…. But is there any way to allow it to appear in the aforementioned without appearing in the actual post itself as I find it takes up a lot of space at the top of the post area. I am adding rev sliders and cornerstone sliders and want them to appear to viewers at the top of posts rather than the static featured image. Hope this makes sense
    Best wishes
    Steve

    #1090528
    Christian
    Moderator

    Hey Steve,

    Please add the code below in your 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:
              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;
          }
    
        }
    
      }

    Hope that helps. 🙂

    #1090794
    StephenMepsted
    Participant

    Thanks very much – forgive me but where do i find functions.php?

    #1090821
    Rupok
    Member

    Hi there,

    Sorry for the confusion. You need to use Child Theme for this customization. So you need to place this within Child Theme’s functions.php.

    Cheers!

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