Okay
  Public Ticket #1303959
Featured Image
Closed

Comments

  • Michaela started the conversation

    Hello, 

    I'm not sure if you remember but last year I requested to have my featured image be disabled from all of my single posts. I now wish to undo this so my featured posts are visible on my single posts. I looked through all of my past tickets and I just cannot seem to find it to remove the CSS code or html

    Looking forward to your response



  • Michaela replied

    Also, for the featured image in single posts. Is it possible to have the featured image displayed as per image attached? (Only the image, not the text)

    Attached files:  Screen Shot 2017-09-15 at 9.25.22 pm.png

  •  332
    Vasilis replied

    Hi there,

    you can remove this from your custom css box

    .single .entry-featured {
        display: none;
    }
    

    and single featured images will reappear.

    This change might break the site I am afraid and it is not possible. If you wish to try to open single.php and remove

    <div class="entry-featured">
                                    <?php
                                        $gallery      = untoldstories_featgal_get_attachments( get_the_ID() );
                                        $gallery_type = get_post_meta( get_the_ID(), 'gallery_layout', true );
                                    ?>
                                    <?php if ( 'gallery' === get_post_format() && $gallery--->have_posts() ) : ?>
                                        <!--?php if ( $gallery_type === 'tiled' ) : ?-->
                                            <div class="entry-justified" data-height="150">
                                                <!--?php while ( $gallery--->have_posts() ) : $gallery->the_post(); ?>
                                                    <a class="untoldstories-lightbox" href="<?php echo esc_url( untoldstories_get_image_src( get_the_ID(), 'large' ) ); ?>">
                                                        <!--?php $attachment = wp_prepare_attachment_for_js( get_the_ID() ); ?-->
                                                        <img src="<?php echo esc_url( untoldstories_get_image_src( get_the_ID(), 'untoldstories_thumb_wide' ) ); ?>" alt="<?php echo esc_attr( $attachment['alt'] ); ?>">
                                                    </a>
                                                <!--?php endwhile; wp_reset_postdata(); ?-->
                                            </div>
                                        <!--?php else : ?-->
                                            <div class="feature-slider slick-slider">
                                                <!--?php while ( $gallery--->have_posts() ) : $gallery->the_post(); ?>
                                                    <div class="slide">
                                                        <a class="untoldstories-lightbox" href="<?php echo esc_url( untoldstories_get_image_src( get_the_ID(), 'large' ) ); ?>">
                                                            <!--?php $attachment = wp_prepare_attachment_for_js( get_the_ID() ); ?-->
                                                            <img src="<?php echo esc_url( untoldstories_get_image_src( get_the_ID(), 'post-thumbnail' ) ); ?>" alt="<?php echo esc_attr( $attachment['alt'] ); ?>">
                                                        </a>
                                                    </div>
                                                <?php endwhile; wp_reset_postdata(); ?>
                                            </div>
                                        <?php endif; ?>
                                    <>php elseif ( has_post_thumbnail() && get_theme_mod( 'single_featured', 1 ) && ( get_post_format() !== 'video' ) && ( get_post_format() !== 'audio' ) ) : ?-->
                                        <a class="untoldstories-lightbox" href="<?php echo untoldstories_get_image_src( get_post_thumbnail_id(), 'large'); ?>">
                                            <!--?php the_post_thumbnail( 'post-thumbnail', array( 'itemprop' =--> 'image' ) ); ?>
                                        </a>
                                    <?php endif; ?>
                                </div>
    

    then add the code here

    https://gist.github.com/markware/137f933a546451be3aa2998534257810

    after

    <?php get_header(); ?>
    

    If you decide to proceed with this modification I would suggest you create a child theme, copy over the files you are editing and make the modifications there. This will allow your changes to survive future theme updates. If you directly edit the theme’s files, all changes will be lost once you update.

    Have a look at this guide to learn more about child themes and how to create one
    www.cssigniter.com/ignite/beginners-guide-child-themes/

  • Michaela replied

    Hi there,

    Ok i wont do the second request. However when I went to change the codes to have my featured images display in the post page the featured image isn't in line with the carousel and post images because I had them changed. How do I make the size of the featured image the same as the post image and in line with the carousel?

  •  332
    Vasilis replied

    Hi there,

    you can open functions.php and replace

    set_post_thumbnail_size( 690, 455, true );

    with

    set_post_thumbnail_size( 1050, 550,true );
    

    then install the Regenerate thumbnails plugin, activate it and go to Tools -> Regen. Thumbnails to run a regeneration in order for the change to be applied.

  • Michaela replied

    hey there,

    I couldn't find it in the functions.php? 

  •  332
    Vasilis replied

    Hi there,

    Could you please check in your parent theme functions.php and not the child theme?

  • Michaela replied

    Hey there,

    Yup, I was checking in my parent theme function. Should I maybe remove the code out of the css box first? Would this help? 

    .single .entry-featured {    display: none;
    }
  •  332
    Vasilis replied

    Hi there

    This css you sended actually hides the featured image from your css, but you should be able to see this code

    set_post_thumbnail_size( 690, 455, true );

    in your functions.php.

    Is it possible to send me WordPress & FTP login credentials in a private reply so I can take a look at this?

  •   Michaela replied privately
  •   Vasilis replied privately
  •   Michaela replied privately
  •  332
    Vasilis replied

    Hi,

    There are 2 functions.php you are looking the inc/functions.php and not the Theme Functions - functions.php file

  • Michaela replied

    oh right.... found it. Thank you =]

  •  332
    Vasilis replied

    Glad I could help!