opensuse4afreeworld
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Twenty Ten] 1200px250px instead of 940x198pxYou would have to insert this code in the functions.php of your child theme, using an individual plugin or code snippet plugin – but not in the theme itself.
Thanks for your reply, this is a very good advice of course!
I encountered another issue after I increased the width to 1200px: If you use a search button with text on it (e.g. “Search” or “Suchen” for German users) instead of the magnifying glass icon, then the text will be split into two lines and you certainly don’t want this. Putting this code in the additional CSS section solves the problem:
.wp-block-search__button {
flex-shrink:0;
}Forum: Themes and Templates
In reply to: [Twenty Ten] 1200px250px instead of 940x198pxThese structural changes are more complex to offer a simple CSS snippet
Sorry, but this is not true. I found an easy solution by editing two lines in twentyten/functions.php:
'width' => apply_filters( 'twentyten_header_image_width', 940 ),
'height' => apply_filters( 'twentyten_header_image_height', 198 ),Replace these numbers by the new values (940×198 –> 1200×252):
'width' => apply_filters( 'twentyten_header_image_width', 1200 ),
'height' => apply_filters( 'twentyten_header_image_height', 252 ),I already tested it and it works flawlessly.
Internally 2010 works further on with 940x198px, so the header is stretched to 1200×250 and it looks not really sharp
After you edited functions.php as I explained you need to upload an image having a width of 1200px. Then it won’t get stretched.
By the way, the height is flexible, so when cropping the uploaded image you can ignore the 252px preselect and adjust the height as you like.
My recommendation would be to move to a more recent default theme, such as Twenty Twenty-Four
I prefer the Twenty Ten theme as well and it got updated to v4.2 just 6 weeks ago. There’s no need to move on to a more recent theme if you like the design of an older theme. This community theme’s CSS and PHP code is cleanly written and well annotated, so it can easily be modified if necessary. I will suggest an update changing the width from 940px to 1200px to the Themes team.