- This topic has 9 replies, 3 voices, and was last updated 8 years ago by
Leo.
-
AuthorPosts
-
February 12, 2018 at 11:14 am #494651
sparkle
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?
February 12, 2018 at 4:09 pm #494800Leo
StaffCustomer SupportHi there,
Setting it to Above Title should work: https://docs.generatepress.com/article/adjusting-the-featured-images/
If you set it above content then it will be above content and sidebar.
February 12, 2018 at 5:12 pm #494836sparkle
ah, but it’s inside the page container. i was hoping for it to be above it. thanks.
February 12, 2018 at 8:47 pm #494909Tom
Lead DeveloperLead DeveloperHi 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 🙂
February 13, 2018 at 4:10 am #495093sparkle
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.
February 13, 2018 at 9:21 am #495446Tom
Lead DeveloperLead DeveloperNo problem! Glad I could help! 🙂
March 9, 2018 at 10:21 am #515812sparkle
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?
March 9, 2018 at 12:09 pm #515895Leo
StaffCustomer SupportHmm featured images are responsive by default.
The problem is that the image isn’t wide enough to fill the container: http://www.screencast.com/t/dYaap1u1Byq
And when you resize the browser down, the size of the image does get smaller: http://www.screencast.com/t/sGEH6kmuW
March 11, 2018 at 12:08 pm #517250sparkle
got it. thank you!
March 11, 2018 at 5:58 pm #517389Leo
StaffCustomer SupportNo problem!
-
AuthorPosts
- You must be logged in to reply to this topic.