Site logo

Archived topic

featured image / sidebar issue

9 replies · Started by sparkle on February 12, 2018

Viewing posts 1–10 of 10

my content uses featured images on pages and posts. i only want the featured image above the main content, and not the sidebars. i used the following css to adjust the image size and move it to the left.

.page .generate-page-header img {
text-align: left; float: left; width: 48.7%;
}

but the sidebars are still level with the top of the content, instead of next to the featured image.

is this possible?

eta, i also noticed on one of my pages this adjustment has sent the sidebar elements to below the page content. (see /gathering--logistics) why?

ah, but it's inside the page container. i was hoping for it to be above it. thanks.

Hi there,

Try this PHP:

add_action( 'wp', 'tu_move_featured_image', 60 );
function tu_move_featured_image() {
    remove_action( 'generate_before_content', 'generate_blog_single_featured_image' );
    add_action( 'generate_before_main_content', 'generate_blog_single_featured_image' );
}

Let me know :)

woohoo! that's just what i wanted. thank you!

i also figured out that a too-wide image set to full width on the /gathering-logistics page was pushing down the sidebars.

thanks again for such an awesome theme.

No problem! Glad I could help! :)

hi. i'm back! :)

we have changed our design from 2 sidebar layout to a 1 sidebar layout.

now i'm wondering if there's a way to make the featured image responsive so on wider screens there's not a gap between our featured images and our sidebar? also on smaller screens, the featured image stays behind the widgets instead of getting smaller.

as long as i'm asking for the moon and stars is it possible to move the title of the page up onto the featured image?

got it. thank you!

No problem!

This archived topic is closed to new replies.