Keep formatting for tables copied from MS Word?

There is a “paste from Word” button. When you’re using the WYSIWYG editor (Visual tab), there’s a button that has a bunch of colored dots on it. When you hover over it, a little box tells you it’s called “kitchen sink”. Click it to expand, and you’ll see a button with the Word icon. Use … Read more

How to define a custom font family for a wordpress blog that will not affect the entire site

You can use this function: http://codex.wordpress.org/Function_Reference/body_class Use this in your header.php <body <?php body_class(); ?>> This gives each page a different class and so you can use CSS to set the font-family for a specific page like so: body.blog span.yourClassName{ font-family:; } Then of course the is also the jQuery solution using the .children() function

Displaying Archives List

There is but the filter sucks, it only gives you the link HTML: add_filter( ‘get_archives_link’, ‘wpse74891_archives_link’ ); function wpse74891_archives_link( $link ) { $link = preg_replace_callback( ‘/>([A-Za-z]+\s+\d{4})/’, function( $matches ) { return ‘>’ . date( ‘m.y’, strtotime( $matches[1] ) ); }, $link ); return $link; } Using this method you can pass in any date format … Read more

Number format for wp_count_posts()

You can use the PHP function number_format(). function wpb_total_posts() { $total = wp_count_posts()->publish; echo number_format( $total, // your number 0, // number of decimal points ‘.’, // decimal point separator ‘,’ // thousands separator ); } Or, because you are using the default values anyway, you can shorten the function to: function wpb_total_posts() { echo … Read more

Stop auto formatting in shortcodes

You can postpone the wp_autop filter which is responsible for wrapping elements in P tags till after shortcodes are rendered: remove_filter( ‘the_content’, ‘wpautop’ ); add_filter( ‘the_content’, ‘wpautop’ , 12);

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