Tag Info

New answers tagged

5

You shouldn't copy that file, precisely because it is too bulky. About half of it is implementation of submission form, which was entirely replaced with comment_form() function around that time. So the answer why was it deprecated is roughly: Newer code is more compact Markup belongs in theme For better and more relevant comments.php example look at ...


0

If google is showing that, then you should consider getting a solid SEO plugin (or edit your theme) and do the following: Add proper meta titles Add proper meta keywords Add proper meta descriptions Make sure you have real content in your posts Beyond that, you should check googles webmaster tools to see if you can exclude certain phrases. If the top ...


0

I think that a good way to get what you are trying to do is to use comment__not_in argument of get_comments() function. Send the IDs of the comments currently being displayed in the Ajax request and use them in the comment__not_in argument. For example, you could send those IDs as comment__not_in[] query var (array format): $comment_not_in = ...


1

Go to yoursite... /wp-admin/options-discussion.php Is Users must be registered and logged in to comment selected? If so, unselect it and Save Changes.


1

Three aspects to this: Adding the checkboxes to the comment form Adding the values from the checkboxes to the comment meta data Displaying the values of the checkboxes Assuming you want to dynamically generate these based on the headings in the article, you'll need to parse the post content for headings and add the checkboxes to the comment form. This ...


0

In your regex there is a space before the # $mh_regex = "/\ #[a-zA-Z0-9-]+/"; so it would match # tag instead of #tag. It might be a good idea to test your regex using this online tool: http://www.regexr.com/ it's really usefull for testing


0

<script type="text/javascript"> function addText() { var input = document.getElementById('comment'); input.value = 'lots of new text ' + input.value; } </script> <p class="comment-form-comment"> <label for="comment">Comment</label> <textarea id="comment" name="comment" cols="45" rows="8" ...


1

You can try the comment_text filter: /** * Prepend text to each comment content. */ add_filter( 'comment_text', function( $comment_text ) { $text = 'Some text'; return $text . $comment_text; }); if you're displaying the comment text with: <?php comment_text(); ?>


0

Please Note: Doing this will be very slow! It would be much better to do one (or preferably both) of the following instead: Use wp_cron to do this on a regular basis Instead of grabbing all comments, the first time it runs set at timestamp in the options table after it completes. Each time afterwards, read the timestamp and grab just those comments made ...


0

Yes it is possible but not exactly trivial or well documented. The easiest option is to have different comment types (ie, have new ones in addition to the traditional comment, pingback and tracback). The biggest problem with this approach is that most of wordpress API and admin is not built to be flexible enough to sopprt different comments types, for ...


1

oh, it looks like I wrote that script, so let me try to answer you ;-) You could for example: add your own action hook in your template, use javascript to move the pings below the Disqus comments, hijack the disqus_language_filter filter of the Disqus plugin. If you go for the last option, you could use this modification of the PingsList class ...


0

you should do something like this //For update a page when use costum template $post = get_the_ID(); $my_post = array( 'ID' => $post, 'comment_status' => 'open' // closed ); // Update the post into the database wp_update_post( $my_post );


1

Actually this is what you need to use. <?php echo get_comment_meta( $comment->comment_ID, 'rating', $rating ); ?> IDs are already stored in $comment array.


2

Look at the function wp_delete_comment(). It fires an action before the comment is deleted: /** * Fires immediately before a comment is deleted from the database. * * @since 1.2.0 * * @param int $comment_id The comment ID. */ do_action( 'delete_comment', $comment_id ); … and one after deletion: /** * Fires immediately after a comment is deleted ...


1

Well, that "link back" might be a Trackback or Pingback. It´s a function to inform other blogs that you have "used", mentioned or linked to their content. It´s made for connecting blogs with each other. Some themes show Track-/Pingbacks in the comment section, some don´t. Anyway, if you want to disable them, you can do so under Settings -> Discussion -> ...


0

Goto Dashboard > Pages . Click on 'Edit' for the page you want to hide comments on. On the top of this screen you'll get Screen Options, Expand this section. Check/Enable the Discussion button. Scroll down on the screen. Uncheck the Allow Comments option.


3

I wonder if you mean this kind of check: if( $comment->user_id > 0 ) { // Registered comment author } in your comment's template callback. This is determined in the the wp-comments-post.php file: $commentdata = compact('comment_post_ID', ..., 'user_ID' ); $comment_id = wp_new_comment( $commentdata ); but it's not obvious where the user_ID ...


1

I don't think there is any safe and reliable method to do this. In my honest opinion, this is also something that I would discourage My biggest concerns here are Anyone can enter a fake email or nickname that can match the details of an already registered member By doing this, an unregistered user might be able to get access to a registered member's ...



Top 50 recent answers are included