How to show recent comments on WordPress homepage with post title?

There’s this built-in function for querying comments get_comments and here’s something that would help in your template: $comments = get_comments( array( ‘number’ => 10 ) ); if ( !empty( $comments ) ) { ?> <ul> <?php foreach ( $comments as $comment ) : ?> <li><?php echo sprintf( “<strong>%s</strong> on <a href=\”%s\”>%s</a> : \”%s\” &mdash; <a … Read more

Customize comment notification e-mails with HTML

I found out it my self. we should add the following code to the Functions.php ti be able to sent Email via HTML codes: <?php function wpse27856_set_content_type(){ return “text/html”; } add_filter( ‘wp_mail_content_type’,’wpse27856_set_content_type’ ); ?> and then for customize the email, we should do like bellow to use HTML code in it: <?php function wpd_comment_notification_text( $notify_message, … Read more

list / show comments of post author in special page

I found out it my self: <?php $post_ids = get_posts(array( ‘fields’ => ‘ids’, // Only get post IDs ‘posts_per_page’ => -1, ‘author’ => get_current_user_id(), ‘post_type’ => ‘post’, ‘category’ => 0, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’, )); foreach($post_ids as $post_id) : $argss = array( ‘post_id’ => $post_id, ‘status’ => ‘approve’, ‘author__not_in’ => get_current_user_id(), ); $comments … Read more

how to remove indent from twently eleven comments reply

If you want to get rid of threading completely you can control it in Settings > Discussion > Other comment settings > Enable threaded (nested) comments. If you want to keep functionality and markup, but change it visually you would need to do that via CSS, which (as per comment on your question) is not … Read more

Changing comment_count to views

Yes, you have to calculate page views. Do not use plugin as it needs a small piece of code. Below code will increase pageviews and will store in post meta. Use this code in single.php or loop-common. if( is_single() ) { /* Increase post view count by 1 */ $post_view_count = get_post_meta($post_id, ‘view_count’, true); if( … Read more

Display DISQUS on homepage

Hook it in from your child themes functions file or add the template tag to a front-page.php file Untested add_action(‘loop_end’,’disqus_front_page_after_loop’); function disqus_front_page_after_loop() { if (is_front_page() && function_exists( ‘comments_template’ ) ) { comments_template(); } } Change the loop_end hook to another WordPress or theme specific hook. If using the template tag, you might want to try … Read more

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