Removing comment option

Remove comments_template() function from single.php template. By the way quick scan with Theme-Check shows that theme contains hardcoded links and runs obfuscated code, not even mentioning massive amount of missing or poorly coded features. I’d not use it without major scrub of internals.

Displaying comment counts in WP Gallery thumbnail view

From the looks of Matt’s page he’s running a filter on either the img or gallery shortcode and replacing the caption with the comment count. I’ve answered two related questions on how to modify the img and gallery shortcode functions, see. How to customize the default HTML for WordPress Attachments How to customise the output … Read more

Problem in getting user comments permalinks

Hi @Ayaz Malik: You need to use the function get_comment_link(). I’ve rewritten your code using some improved techniques and included the function call in place of what you had: global $wpdb; $sql =<<<SQL SELECT {$wpdb->comments}.comment_ID, {$wpdb->comments}.comment_post_ID, {$wpdb->comments}.comment_content, {$wpdb->posts}.post_title FROM {$wpdb->comments} INNER JOIN {$wpdb->posts} ON {$wpdb->comments}.comment_post_id={$wpdb->posts}.ID WHERE 1=1 AND {$wpdb->comments}.user_id = %d AND {$wpdb->comments}.comment_approved = 1 … Read more

Return count for characters in the comment and perform action based on the length

By using a function to perform that: recent_comment_text_more($comment_content) that function would look like (in case you’re using PHP, part of your code looks from another language): function recent_comment_text_more($comment_content, $more_href) { if (strlen($comment_content) > 180) { $comment_content = substr($comment_content, 0, 177) . sprintf(‘<a href=”https://wordpress.stackexchange.com/questions/8656/%s”>… (more)</a>’, $more_href); } return $comment_content; } Good luck! Multibyte charset safe variant … Read more

Comment form in wordpress theme returns a javascript alert

I tried removing all the javascript of the theme, updating the comments related files in the server (the same error happens locally) The problem is a result of this file(you obviously didn’t disable that one in testing). http://www.faf.fi/wp-content/themes/faf/scripts/js/functions.js Blocking that script in my browser resolves the issue, but i think it’s this area of the … Read more

Users moderate own comments

http://wordpress.org/extend/plugins/role-scoper/ This plugin is great for fine tuned control of content. I have not, however, tried what you are requesting. So I can only suggest it as something to look into…. I’m not sure if it gives such fine tuned control over comments….

How / where is the wp_query object created for RSS feeds?

These files are not loaded directly, but similar to regular template files, only after the WP class is initialized. This class does the main query, which already can include the comments if the correct query variables are set. The execution flow is a follows, starting in the main index.php: require(‘./wp-blog-header.php’); require_once( dirname(__FILE__) . ‘/wp-load.php’ ); … Read more

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