Support » Themes and Templates » [Theme: Twenty Twelve] Change featured images size above 624px ?

  • cupshaker


    (fresh noob here.)

    I’d like to change the size of the normal post’s feature image above 624px. To make the image fit the entire site’s width (960px max, like the default theme’s setup).

    So far, I’ve been successfully trying to reduce the witdh under 624px. To do so, I’ve been messing with the function.php at line 74 where I’ve changed the following line…

    set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop

    But it doen’t seem to work when I change the width to 960.

    Thanks for your help if you have any clue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi cupshaker

    Did you anywhere with this issue? Am I having the same problem and have tried a few things without much luck.

    Hope you figured out and can help with a solution.


    In content.php you can set the image size like so. (around line 17)

    <header class="entry-header">
    <?php the_post_thumbnail("960"); ?>

    The only caveat is that you would have to modify the site-content class width in style.css to see the image span to 960

    .site-content {
       width: 100%

    I would add a class in page.php so you can target this specifically on the pages that you want this layout to be done since this change would bump down any navigation that is on the right hand side and would be applied to every page that implements this style.

    get_header(); ?>
    	<div id="primary" class="site-content new-class">
    		<div id="content" role="main">

    Maybe someone has a better way, this was off the top of my head.

    In style.php find header-image then add

    See below sample;

    .header-image {
    margin-top: 24px;
    margin-top: 1.714285714rem;
    width: 100%;

    No! Do not edit the Twenty Twelve theme. It is the current default WordPress theme and having access to an original, unedited, copy of the theme is vital in many situations. First create a child theme for your changes.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Theme: Twenty Twelve] Change featured images size above 624px ?’ is closed to new replies.