Site logo

Archived topic

entry_title or entry_header above fetured image

10 replies · Started by Roman on June 25, 2017

Viewing posts 1–11 of 11

I would like to have entry_title (or maybe the whole entry_header) displayed above the featured image for single posts. The featured image is displayed above content below header. Any ideas?

Hi there,

Have you tried the settings in Customizer > Layout > Page header > Single Post Header Location?

Or that doesn't do what you are looking for?

Hi Leo,

that doesn’t do what I would like to. I would like to have it above the featured image and not above the content. The featured image is displayed above content below header.

Sorry little confused. Wouldn't that just be Below Post Title in Customizer > Layout > Page header > Single Post Header Location?

Ah, so you want the image to still be above the content, but you want your title to be above it as well.

Looks like something the new Page Header update in 1.4 will be able to achieve: https://vimeo.com/223381628

Hm, no idea how to even setup page header in 1.4 for single posts showing single featured image while using Featured Image from URL plugin.

I try to achieve to have for example the post title displayed above featured image. While I use your code:


add_action( 'generate_after_header', 'tu_add_featured_image_from_url' );
function tu_add_featured_image_from_url() {
	if ( get_post_meta( get_the_ID(), 'fifu_image_url', true ) && is_singular() ) {
		echo '<div class="page-header-image grid-container grid-parent generate-page-header">';
			the_post_thumbnail();
		echo '</div>';
	}
}

which is hooked after header then the content of page header (with dinamic post title) should be displayed above page header and not below, shouldn't it?

But it does not: http://telezjetele.cz/plannereck-solo/

Try this instead:

add_action( 'generate_after_header', 'tu_add_featured_image_from_url', 50 );
function tu_add_featured_image_from_url() {
	if ( get_post_meta( get_the_ID(), 'fifu_image_url', true ) && is_singular() ) {
		echo '<div class="page-header-image grid-container grid-parent generate-page-header">';
			the_post_thumbnail();
		echo '</div>';
	}
}

Thank you.

You're welcome!

This archived topic is closed to new replies.