I want to add a class to main div on a template. how can I do that?

You’re probably looking for something like this: <?php function add_classes_to_body_class($classes) { // make sure ‘page-template.php’ matches your template name if ( is_page_template(‘page-template.php’) ) { $classes[] = ‘main’; } return $classes; } add_filter( ‘body_class’, ‘add_classes_to_body_class’ ); ?> make sure you add body_class() into your markup. Traditionally it would be in your body tag like so. <body … Read more

Accesibility problems with dropdown menus in twentyten theme or others

This is a known issue with the Twenty Ten theme, arising from both the theme and core code. Twenty Ten has a number of accessibility issues – see Trac: http://core.trac.wordpress.org/ticket/14782 Some of these have been corrected in a child theme for Twenty Ten that you can get here: http://accessible.sprungmarker.de/2011/01/accessible-1-0/ The CSS and functions in the … Read more

How do I create a magazine type menu – sub-menu setup using wp_nav_menu and child of twentyten? [closed]

There are probably several solutions to this, but this is what I would do: First set a static front page. This can be done in Settings->Reading. This will cause the menu item (page) selected to have the CSS class current-menu-item and also to display any sub-menu items you have. Then you just CSS them to … Read more

What’s the correct way to include files in WordPress TwentyTen theme with it’s own jquery scripts and css?

You need to have the script in a separate file (normally it would be filename.js; I suppose filename.php would work?). Then, you need to register and enqueue that script file, using wp_register_script() and wp_enqueue_script() e.g.: function mytheme_register_custom_scripts() { if ( ! is_admin() ) { $scriptsrc = get_stylesheet_directory_uri() . ‘/scripts/filename.js’; wp_register_script( ‘mytheme_slider’, $scriptsrc ); } } … Read more

Making the Header on the Twenty Ten Theme Less Tall?

To make the header on the Twenty Ten theme less tall (i.e. a height with fewer pixels) put this code at the bottom of your theme’s “functions.php” file (being sure to change the number 180 to whatever height you want): <?php add_action(‘twentyten_header_image_height’,’yoursite_header_image_height’); function yoursite_header_image_height($height) { return 180; // Modify this to whatever pixel height you … Read more

Where can I find a good reviewed collection of Twenty Ten child themes?

My VoodooPress site is a twentyten child theme. Has some pretty cool functions going on behind the scenes. But pretty much every post on the site is about things to do with a twenty ten child theme. For instance, the things you ask about: Working with thumbnails Adding image sizes etc. Hopefully you can find … Read more