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

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

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