Support » Theme: Forever » Removing connection with featured images and slider

  • Hi I’m using the forever theme on my site:

    http://figandhoney.co

    I’m not currently using the slider functionality that comes with the theme but do want to use the featured images for a different purpose. As of right now, any featured images are treated as though they will go into the slider and do not display full posts on the home page (as outlined by the theme description).

    Is there a way that I can disable this connection so that I can assign a featured image to the posts AND have full posts on the home page? I don’t want the posts to be truncated and assigned to the slider.

    Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Kevin

    (@kevmarsden)

    Hi @anjanee,

    Even though the featured images are used for the slider, you can still use them with posts.

    If you look at the recent-posts.php file, you’ll see how the theme adds featured images to the four most recent posts shown on the home page.

    If you decide to make any changes to the theme files, please be sure to use a child theme to make it easier to track the changes and ensure they aren’t lost when theme is updated.

    Thread Starter anjanee

    (@anjanee)

    Kevin,

    Thanks for the reply and pointing me in the right direction. I’ve located the file but the contents are a little beyond my capabilities. What would I need to change in order to achieve the functionality I described above? Here is the code:

    <?php
    /**
    * Displays the latest four posts in grid format.
    *
    * @package Forever
    * @since Forever 1.1
    */

    $latest_four = apply_filters( ‘forever-recent-posts’, false );

    if ( ! $latest_four )
    return;

    $post_counter = 0;

    $latest_content = new WP_Query( array(
    ‘order’ => ‘DESC’,
    ‘post__in’ => (array) $latest_four,
    ‘ignore_sticky_posts’ => 1
    ) );

    ?>

    <div id=”recent-content”>

    <?php while ( $latest_content->have_posts() ) :

    $latest_content->the_post();
    $post_counter++; ?>

    <article class=”recent-post” id=”recent-post-<?php echo $post_counter; ?>”>

    <?php
    $thumbnail = get_the_post_thumbnail( null, ‘small-feature’ );
    if ( ! empty( $thumbnail ) ) {
    printf( ‘%3$s‘,
    esc_url( get_permalink() ),
    esc_attr( sprintf( __( ‘Permalink to %s’, ‘forever’ ), the_title_attribute( ‘echo=0’ ) ) ),
    $thumbnail
    );
    }
    ?>

    <header class=”recent-header”>
    <h1 class=”recent-title”><?php
    printf( ‘%3$s‘,
    esc_url( get_permalink() ),
    esc_attr( sprintf( __( ‘Permalink to %s’, ‘forever’ ), the_title_attribute( ‘echo=0’ ) ) ),
    get_the_title()
    );
    ?></h1>

    <div class=”entry-meta”>
    <?php forever_posted_on(); ?>
    </div><!– .entry-meta –>
    </header><!– .recent-header –>

    <div class=”recent-summary”>
    <?php the_excerpt(); ?>
    </div><!– .recent-summary –>
    </article>

    <?php endwhile; ?>

    </div>

    <?php wp_reset_postdata();

    Hopefully you can help. Thanks!

    Kevin

    (@kevmarsden)

    The Featured Image is displayed with either the the_post_thumbnail(); or the
    get_the_post_thumbnail(); functions.

    http://codex.wordpress.org/Function_Reference/the_post_thumbnail

    http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail

    It looks like you’ve already made some changes to the template, so it’s difficult to tell you definitively, but it’s likely one of the post thumbnail functions need to be added to the content-single.php and content.php files.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing connection with featured images and slider’ is closed to new replies.