• Resolved martcol

    (@hotmale)


    I have a theme that enables featured image on post/archive page using a small thumb. I want to change theme but this one (Reactor), built on Foundation, uses the image again in the single post at the top.

    Lots of old posts have an image in the post which is also the featured image so now all of the posts have two copies of the same image in the post.

    What do I look for to change this? Will it be a function or part of the loop or both?

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi

    Sounds like a single.php issue, look in there to see if the featured img is output as part of the loop ..

    Thread Starter martcol

    (@hotmale)

    Thank you for looking.

    This is in single.php:

    while ( have_posts() ) : the_post(); ?>
         <?php reactor_post_before(); ?>
           if ( !get_post_format() ) : get_template_part('post-formats/format', 'standard');
    else : get_template_part('post-formats/format', get_post_format() ); endif; ?>

    It is also using other files and as far as I can work out this includes:
    format-standard.php and
    content-posts.php

    It’s a bit too complicated for me but I have done a lot of work on this already.

    Thread Starter martcol

    (@hotmale)

    Some help would be great on this.

    If it is useful, the site is martcol.co.uk/karban and the blog section is under “news.”

    I have added some hacks just to try and work out what is doing what but so far, I’m defeated.

    Martin

    Thread Starter martcol

    (@hotmale)

    OK, so now I think that this piece of code is what calls the post image thumb into the post AND the post page:

    /**
     * Post thumbnail
     * in format-standard
     *
     * @since 1.0.0
     */
    function reactor_do_standard_thumbnail() {
    $link_titles = reactor_option('frontpage_link_titles', 0);
    	if ( has_post_thumbnail() ) { ?>
    <div class="entry-thumbnail">
    	<?php if ( is_page_template('page-templates/front-page.php') && !$link_titles ) {
    	the_post_thumbnail( 'thumb-150' );
    		} else { ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'thumb-150' ); ?></a>
        <?php } ?>
    </div>
    	<?php }
    }
    add_action('reactor_post_header', 'reactor_do_standard_thumbnail', 4);

    The full code can be seen here in content-posts.php: https://github.com/awtheme/reactor/blob/master/library/inc/content/content-posts.php

    So, can someone tell me if this is doing what I think it is and how I might try to change it to pull the thumbnail in to the posts page but not the post?

    Thanks

    Have you asked the developer of the theme for help with this?

    These forums only support themes from the repository on this site.

    Thread Starter martcol

    (@hotmale)

    Yes, I have been to the developer. He does not offer support. The only place I can really have a go at it is through his Git page and that just doesn’t seem the place for it.

    I am still hopeful that someone here will help me. I don’t see it so much as a theme specific thing. For me, it is more about understanding what is going on in this implementation of WordPress.

    I started out by customizing themes a few years ago and it seemed pretty much just a case of cutting and pasting. Increasingly, themes are using hooks, functions, includes and all that fancy shizzle and I am just chasing my tail.

    I keep reading, staring, reading and staring but I am not getting it.

    You can try and remove the last line, which is the actual call to that thumbnail function:

    add_action('reactor_post_header', 'reactor_do_standard_thumbnail', 4);

    Thread Starter martcol

    (@hotmale)

    This is what did it in the end:

    function reactor_do_standard_thumbnail() {
      $link_titles = reactor_option('frontpage_link_titles', 0);
        if ( has_post_thumbnail() ) { ?>
       <div class="entry-thumbnail small-4 column">
            <?php if ( is_page_template('page-templates/front-page.php') && !$link_titles ) {
        the_post_thumbnail( 'thumb-150' ); ?>
        <?php } elseif ( is_single()){ ;?>
        <?php } else { ;?>
             <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('thumb-150'); ?></a>
                <?php } ?>
    		</div>
    	<?php }
    }
    add_action('reactor_post_header', 'reactor_do_standard_thumbnail', 4);
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Changing featured image thumb’ is closed to new replies.