- This topic has 11 replies, 3 voices, and was last updated 8 years, 7 months ago by
Tom.
-
AuthorPosts
-
September 1, 2017 at 9:34 am #377439
Marcin
Hello!
I set the featured image size to 353×235, but on mobile it looks bad.
It is possible to set the size of featured images on mobile version to “auto”?website: http://marcinszkodzinski.pl (See the home page on your smartphone)
September 1, 2017 at 11:19 am #377500Tom
Lead DeveloperLead DeveloperThe best thing to do is set your image to as wide as it needs to be on mobile, then do any resizing using CSS on desktop. Images can be sized down, but not up.
Let me know if you need more info 🙂
September 1, 2017 at 12:10 pm #377530Marcin
I’m not sure I understand. 🙂
September 1, 2017 at 2:00 pm #377585Leo
StaffCustomer SupportWhat would like to happen on mobile? It looks fine to me?
September 2, 2017 at 1:13 am #377736Marcin
Horizontal position. 🙂
September 2, 2017 at 8:34 am #377881Tom
Lead DeveloperLead DeveloperBasically, make your image larger than it currently is, so it looks good on mobile.
Then use CSS for desktop to make it smaller:
@media (min-width: 769px) { .post-image img { max-width: 250px; } }September 3, 2017 at 12:01 pm #378440Marcin
Ok, thanks.
My page is almost ready.
The last question:
How to remove “page header” on mobile devices? The whole picture on the screen looks bad.
I want it to be just a picture before content
I hope you understand 🙂
It’s a foreign language for me. 🙂September 3, 2017 at 5:32 pm #378541Leo
StaffCustomer SupportSince you are not adding contents in page header, try uploading it as featured images instead: https://docs.generatepress.com/article/adding-featured-images/
Let me know if this works for you.
September 4, 2017 at 12:13 am #378648Marcin
On my page, the featured image it’s the “page header”. On mobile devices, this looks bad, so I would like this to be a normal image.
It means:
On computers, the featured image is in accordance with the settings of the page header.
On mobile devices, featured image is…a normal featured image.
Is it possible?September 4, 2017 at 10:49 pm #379247Tom
Lead DeveloperLead DeveloperWould you like it to appear in the exact same spot as the current Page Header? So basically just a static image to replace the current Page Header background image?
September 5, 2017 at 1:40 am #379329Marcin
Yes.
September 5, 2017 at 2:15 pm #379778Tom
Lead DeveloperLead DeveloperFirst, add this CSS:
@media (max-width: 768px) { .page-header-content { display: none; } }Then, add this PHP:
add_action( 'generate_after_header', 'tu_add_static_featured_image' ); function tu_add_static_featured_image() { if ( is_singular() ) { echo '<div class="hide-on-desktop hide-on-tablet">'; the_post_thumbnail(); echo '</div>'; } } -
AuthorPosts
- You must be logged in to reply to this topic.