Why max-width:97.5% on content images?

Since the TwentyEleven theme also includes some default padding and a border for (fluid) images (see CSS below), a width of 100% would push the image outside of its container’s width. This is because of how the box model works: border and padding are added to the width/height. img[class*=”align”], img[class*=”wp-image-“], #content .gallery .gallery-icon img { … Read more

How to replace default rotating header images with my own

Best way to go is to make a Child Theme of Twenty Eleven. Then first remove the default images: // REMOVE TWENTY ELEVEN DEFAULT HEADER IMAGES function wptips_remove_header_images() { unregister_default_headers( array(‘wheel’,’shore’,’trolley’,’pine-cone’,’chessboard’,’lanterns’,’willow’,’hanoi’) ); } add_action( ‘after_setup_theme’, ‘wptips_remove_header_images’, 11 ); After that you can tell your Child theme to use your own images: //ADD NEW DEFAULT HEADER … Read more

Optimal approach for replacing the 8 header images in a child theme?

I am never sure about ‘optimal approach’ – however, I am using this in the functions.php in a child theme of Twenty Eleven //deregister the header images of Twenty Eleven, and register a few new RAW header images// add_action( ‘after_setup_theme’, ‘raw_theme_header_images’, 11 ); function raw_theme_header_images() { unregister_default_headers( array( ‘wheel’, ‘shore’, ‘trolley’, ‘pine-cone’, ‘chessboard’, ‘lanterns’, ‘willow’, … Read more

How do I add nested categories to drop-down menu in twenty-eleven?

As a purely theory example, this is how I would approach the problem: $cats = get_categories(); echo ‘<ul>’; foreach($cats as $cat) { echo'<li>’.$cat->name; if($cat->parent != 0) { $subcats = get_category(‘child_of=”.$cat->cat_ID; echo “<ul>’; foreach($subcats as $subcat){ echo ‘<li>’.$subcat->name.'</li>’; } } echo ‘</li>’; } echo ‘</ul>’; I don’t expect that to work fully as I coded it … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)