Reactor Theme is built on Zurb Foundation and is here – I think it’s quite good.
The theme I am replacing used the featured image in the posts or blog page but not in the post itself. Reactor calls the image in both. I want to try and change that so that I can have the featured image on the blog page and not in the post. It causes a problem because I usually use the image in the post and use that for the blog page.
The Reactor theme uses lots of includes, functions, hooks and all that fancy shizzle so I am finding it complicated. I think I have worked out that this is calling in the featured image:
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 for that is here on Git.
Am I correct in thinking that this bit of code is what is doing what I think it is? Can anyone give me a clue as to how I change this behaviour?
Thanks
Callback
This is how “Reactor” hooks the callback
Backtrace
The function itself is hooked from where you linked
but this file is called by the
class Reactor
. This class/file is not included during the main callback hooked toafter_setup_theme
in thefunctions.php
file on priority 10, but before that without a callback. And it gets instantiated right afterwards:When the class gets instantiated and the
__construct()
or gets called, it hooks the callback that registers the callback for the default thumb on priority 14 on theafter_setup_theme
hook … (FYI: in lame PHP 4 style).Then the
content()
method does nothing else than including another file:And this file is the one that actually attaches the default thumbnail here.
Exchange
Now simply add the following in your CHILD THEME
functions.php
file.NOTE
To preserve your changes, use a Child Theme. When you take a closer look at the site, then you’ll see that there already exists one.
This is what cracked it: