Move the title under the featured Image in articles

Hello !

I’ve used your Sydney Theme without any problem since recently when the title (and the author, and the date…) decided to move above the featured image for no reason.
An example :

I can’t find a way to put it back where it belongs : under the image.

Thanks a lot for your help.

Hello there,

It happens due to layout change in the recent version of Sydney. To move it, try adding the below snippet to a child theme’s functions.php file.

add_action('sydney_inside_top_post', 'sydney_child_move_featured_image');
function sydney_child_move_featured_image() {
	if( !is_singular('post') ) {
		return;
	}
	?>

	<?php if ( has_post_thumbnail() && ( get_theme_mod( 'post_feat_image' ) != 1 ) ) : ?>
		<div class="entry-thumb entry-thumb2">
			<?php the_post_thumbnail('large-thumb'); ?>
		</div>
	<?php endif; ?>

	<?php
}

Or use a plugin that allows the same purpose like https://wordpress.org/plugins/functionality/

Then add the below CSS code to Appearance > Customize > Additional CSS from dashboard.

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

    .single .entry-thumb.entry-thumb2 {
      display: block;
    }

Regards,
Kharis

Hello Kharis and thanks for your quick answer.

I’ve tried your second option, installed the plug in, then pasted the css you’ve given me but it only makes the featured image disappear.

Do I have to try the first option? I don’t usually touch the php…

Thanks again

By the way, If I may, I found very odd to force this kind of change to your old costumers… We’ve passed long hours to work on the way it looks on our website, and without asking you guyz are just changing tons of website… Probably not your fault though…

Up ! Still stuck here :slight_smile:

Up ! Still stuck here :slight_smile:

Hello there,

Try Code Snippets plugin and ensure the code runs everywhere or in the front end.

Regards,
Kharis

With the CSS code you gave me? It does exactly the same thing that with “additional css from dashboard” : make the featured image disappear.

Thanks again for your help

Add the below code with Code Snippets plugin.

add_action('sydney_inside_top_post', 'sydney_child_move_featured_image');
function sydney_child_move_featured_image() {
	if( !is_singular('post') ) {
		return;
	}
	?>

	<?php if ( has_post_thumbnail() && ( get_theme_mod( 'post_feat_image' ) != 1 ) ) : ?>
		<div class="entry-thumb entry-thumb2">
			<?php the_post_thumbnail('large-thumb'); ?>
		</div>
	<?php endif; ?>

	<?php
}

It will add second featured image with unique class name .entry-thumb2 The CSS code hides the featured image, but this new one .entry-thumb2.

Regards,
Kharis

It works!!

Thanks a lot Kharis. :slight_smile:

You’re welcome!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis