Twenty Eleven header resize

In your Twenty Eleven child theme (don’t edit the main theme!) create a new header.php file, copy the content from the parent theme, and replace this part: <body <?php body_class(); ?>> <div id=”page” class=”hfeed”> … with something like this: <body <?php body_class(); ?>> <div style=”background:#345;color:#eee;padding:10px 20px;margin:0 -2em”>Hello</div> <div id=”page” class=”hfeed”> But move the CSS into … Read more

Twenty-Eleven Theme and Automatic Picture Resizing

Here is a quick function to remove the width and height attributes from images which should resolve your issue. function _remove_img_dimensions_WPA84292($html) { $html = preg_replace(‘/(width|height)=[“\’]\d*[“\’]\s?/’, “”, $html); return $html; } //for new images add_filter(‘post_thumbnail_html’, ‘_remove_img_dimensions_WPA84292’, 10); add_filter( ‘image_send_to_editor’, ‘_remove_img_dimensions_WPA84292’, 10 ); //for images already inserted into posts add_filter(‘the_content’, ‘_remove_img_dimensions_WPA84292’, 10);

Changing 2011 theme header image based on user dropdown

I had to take information from both of your posts to be able to come with something. Try replacing <img src=”https://wordpress.stackexchange.com/questions/89211/<?php header_image(); ?>” width=”<?php echo $header_image_width; ?>” height=”<?php echo $header_image_height; ?>” alt=”” /> width <?php if (!(isset($_POST[“styles”]))) { //if post not set (first visit) if ($_COOKIE[“chosenStyle”] == “night”) { echo ‘<img src=”‘.get_template_directory_uri() . ‘/images/headers/SomethingOriginalTheMoonAndStars.png” width=”1000″ … Read more

Twenty Eleven theme, how to change style to a specific “format”

Targeting the whole page First, ensure that you’re calling body_class() inside of the HTML <body> tag: <body <?php body_class(); ?> Then, you can take advantage of the post format-specific classes output by body_class() to style according to your needs. Single blog posts use the class single-post-format-{format} body.single-format-aside {} Archive index pages for a post format … Read more

How do you add a custom excerpt length in twenty eleven child theme?

In your second approach remove <?php the_excerpt(); ?> and replace it with: <?php echo wp_trim_words( get_the_excerpt() , 60); ?> it will show 60 words change to word amount you want. Edit I replaced exact following in content.php: <div class=”entry-content”> <?php the_content( __( ‘Continue reading <span class=”meta-nav”>&rarr;</span>’, ‘twentyeleven’ ) ); ?> <?php wp_link_pages( array( ‘before’ => … Read more

Chat window hiding behind Twenty Eleven header

It is indeed a z-index problem. The #branding element has a z-index of 2, in other themes (like Twenty Ten, the default in 3.0 and 3.1), it was not set. A simple solution is to set the z-index of #chat-block-site to something higher. #chat-block-site { z-index: 10; }