• Hi, a very nice shows me how increase the theme from 940px to 1200px, it was necessary to add some ows in CSS:

    access .menu-header, div.menu, #colophon, #branding, #main, #wrapper {

    margin: 0 auto;
    width: 1200px;

    } access {

    width: 1200px;

    } branding img {

    width: 1200px;
    max-width: 100%;
    height: auto;

    }

    But one problem remain:

    Internally 2010 works further on with 940x198px, so the header is stretched to 1200×250 and it looks not really sharp:

    How and where can I change this????

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Felipe Santos

    (@foosantos)

    Hi there,

    These structural changes are more complex to offer a simple CSS snippet, especially for a theme created ~ 15 years ago. My recommendation would be to move to a more recent default theme, such as Twenty Twenty-Four. Have you considered that? From there, you can edit the theme to look closer to what you want.

    opensuse4afreeworld

    (@opensuse4afreeworld)

    These 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.

    Note on the tip to adjust the theme’s functions.php: I would strongly advise against this. The change will be overwritten the next time the theme is updated. In addition, if you make such a change, you can no longer be offered support because you don’t know what state your theme is in.

    A clean way would be to adjust the values ??using the filters mentioned above. For example:

    add_filter( 'twentyten_header_image_width', function() { return 1200 });

    You 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.

    opensuse4afreeworld

    (@opensuse4afreeworld)

    You 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;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.