Comments appear in wrong posts
Comments appear in wrong posts
Comments appear in wrong posts
$comment is not set inside that function. Look into variable scope. $_POST[‘comment_parent’] should be set though. function custom_validate_comment() { //validate rating if( isset($_POST[‘comment_parent’]) && $_POST[‘comment_parent’] === 0) { if( empty( $_POST[‘rating’]) ) wp_die( __(‘Error: Please Include Your Rating (0 to 5 Stars)’) ); } } add_action(‘pre_comment_on_post’, ‘custom_validate_comment’); You could also rewrite your function to take … Read more
How to allow special characters in comment name?
wp_insert_user email confirmation
Dashboard – options – discussions Before a comment appears: An administrator must always approve the comment Comment author must fill out name and e-mail Comment author must have a previously approved comment Uncheck at least 1 and 3.
Use get_comment_author_link() instead of <a href … </a>: echo get_comment_author_link();
Your theme should have a comments.php file. Can you just remove the field there? For instance, my comments.php files has the following code: <p class=”field”><label for=”url”><?php _e(‘Website’, ‘theme1721′); ?> </label><input type=”text” name=”url” id=”url” value=”<?php echo esc_attr($comment_author_url); ?>” size=”22″ tabindex=”3″ /></p> I would just remove it if I didn’t want visitors to have the option to … Read more
Get url/link to latest comments in a post
you can get comment link by wp function $args = array( ‘number’ => ‘1’, ‘post_id’ => your_post_id, // use post_id, not post_ID ); $comments = get_comments($args); <a href=”https://wordpress.stackexchange.com/questions/108654/<?php echo get_comment_link( $comments->comment_ID ); ?>”>postname</a>
The plugin author has solved the issue. He says: I have encountered this bug before, but I just now realized what’s causing it: the ‘comment_text’ filter is not applied on the updated comment content. The make_clickable() function, which makes the links in the content clickable, is hooked to this ‘comment_text’ filter. Anyway, it’s fixed now: … Read more