My posts show 2 comment forms
Try making sure that you don’t have more than one copy of Jetpack. Also try activating and deactivating Jetpack. The issue could also be in the PHP files of the plugin.
Try making sure that you don’t have more than one copy of Jetpack. Also try activating and deactivating Jetpack. The issue could also be in the PHP files of the plugin.
It appears that you’re intending to redirect the user to a certain page, after the user posts a comment? If so: why are you hooking into get_commenet_link for this redirect? The get_comment_link() function is intended to return the permalink to a given comment. The get_comment_link filter is intended to filer the comment permalink returned by … Read more
There is no wp_notify_postauthor filter, a pluggable function is one you override with your own function: if( ! function_exists(‘wp_notify_postauthor’) ) { function wp_notify_postauthor( $comment_id, $comment_type=”” ) { // your own wp_notify_postauthor code } } I suggest looking at the function in source to see what it does.
Set the “parent” parameter as 0. $args = array( ‘parent’ => 0, ‘post_type’ => ‘custom-post-type’, ‘number’ => ‘1’, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’ ); $comments = get_comments($args); foreach($comments as $comment) : echo($comment->comment_author . ‘<br />’ . $comment->comment_content); endforeach;
paginate_comment_links() actually does some magic setup for comments and then calls the standard wordpress paginate_links(). I believe that part of that magic utilizes the result of wp_list_comments(). So even though your code is works great – you cannot use the built-in paginate comments functionallity because you are not using wp_list_comments(). And you can’t use that … Read more
The wordpress database seems fairly straight forward and is extremely well documented: http://codex.wordpress.org/Database_Description It seems to me that all the category information is stored in the table wp_term_relationships. So you should select from the comments table, join it with the posts table and then the term_relationships table in order to get the category for each … Read more
A little late, but you could also add the following to your theme’s functions.php file: /** Comment Form Function Defaults */ add_filter(‘comment_form_defaults’,’my_comment_defaults’); function my_comment_defaults($defaults) { global $user_identity, $id; if ( isset($post_id) ) $id = $post_id; else $post_id = $id; $commenter = wp_get_current_commenter(); $req = get_option( ‘require_name_email’ ); $aria_req = ( $req ? ” aria-required=’true'” : … Read more
The easiest and quickest way that you can do this is by downloading the Comment Images plugin and limit access to the upload feature by the function current_user_can. As the WP page demonstrates, use: if ( current_user_can(‘manage_options’) ) { // Plugin code here } I had a very quick look at the plugin code and … Read more
You cannot change the requirement in a theme, just the presentation of that requirement. Make the settings in wp-admin/options-discussion.php instead:
I am using a helper function for that. functions.php /** * Count amount of pingbacks + trackbacks for a post. * * @param int $post_id Post ID for comment query. Default is current post. * @return int */ function t5_count_pings( $post_id = NULL ) { $pings = 0; $comments = FALSE; if ( NULL !== … Read more