How to add Disqus comment count

I have the same problem with displaying number of comments in the loop. I solve this by turn off two filters in file plugins/disqus/disqus.php at line 1124: <?php #add_filter(‘comments_number’, ‘dsq_comments_text’); #add_filter(‘get_comments_number’, ‘dsq_comments_number’); And I have added to my template span with disqus elements: <?php if ( function_exists( ‘dsq_identifier_for_post’ ) ) { global $post; echo ‘<span … Read more

Custom post status not working

The post status values seems to be hardcoded in the core. Here’s the status box code for the edit screen: <span id=”post-status-display”> <?php switch ( $post->post_status ) { case ‘private’: _e(‘Privately Published’); break; case ‘publish’: _e(‘Published’); break; case ‘future’: _e(‘Scheduled’); break; case ‘pending’: _e(‘Pending Review’); break; case ‘draft’: case ‘auto-draft’: _e(‘Draft’); break; } ?> </span> … Read more

Get a button for in the Editor

There’s an easy way. Open functions.php and add this code. It works for many html entities // got this form http://www.sycha.com/wordpress-add-hr-button-tinymce-visual-editor function enable_more_buttons($buttons) { $buttons[] = ‘hr’; /* Repeat with any other buttons you want to add, e.g. $buttons[] = ‘fontselect’; $buttons[] = ‘sup’; */ return $buttons; } add_filter(“mce_buttons”, “enable_more_buttons”); //add_filter(“mce_buttons_2”, “enable_more_buttons”); // add to … Read more

using wp_update_post on save_post

The reason it’s going to be infinite is that every time you save the post, it’s calling change_year…which then calls wp_update_post … which fires the save_post filter. After some review and research, I’m thinking that you should probably avoid the save_post filter. Try using this filter: http://codex.wordpress.org/Plugin_API/Filter_Reference/wp_insert_post_data It gives you really what you want. Here’s … Read more

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