Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 6035

Comments allow your website's visitors to have a discussion with you and each other. When you activate comments on a Page or post, WordPress inserts several text boxes after your content where users can submit their comments.

9 votes
Accepted

Is it possible to show custom comment metadata in the admin panel?

To show the content on individual edit pages you need to add custom meta boxes to the comment edit page. You'll use the key comment for the $page argument of add_meta_box. <?php add_action( 'add_met …
chrisguitarguy's user avatar
2 votes

displaying recent comments outside loop without plugin

php $comments = get_comments(array( 'number' => 10, // 10 comments 'status' => 'approve', // only approved comments 'post_status' => 'publish', // only on published posts )); // … do stuff with $comments You can see how the core itself does this in the recent comments widget. …
chrisguitarguy's user avatar
3 votes

How do i hide all comments from logged out users

If you need to remove comments on ALL post types for non-logged in users, the second option is likely the best. If you need it conditionally on some post types, the first is the best. … Want to show comments on certain posts? The first two options above don't let you do that (without some refactoring). …
chrisguitarguy's user avatar
6 votes
Accepted

Admin can enter JavaScript - potential security risk?

The answer is in your question. I try this when login as admin and editor. The roles have the unfiltered_html capability that allows them to put whatever HTML they choose, including <script> tag …
chrisguitarguy's user avatar
2 votes
Accepted

How to implement just the wp commenting area on my custom site?

The Twenty Eleven Theme has some decent code comments that explain what's happening. Quick and dirty overview: All comment functionality goes in comments.php. … Like wp_list_comments this // will just work. // http://codex.wordpress.org/Function_Reference/comment_form comment_form(); } else { // display a message about comments being close for …
chrisguitarguy's user avatar
1 vote

custom comment_form fields not displaying

I think you're a bit confused about how comment_form works. So let's take a look (this is in wp-includes/comment-template.php): <?php function comment_form( $args = array(), $post_id = null ) { …
chrisguitarguy's user avatar
4 votes

"Discussion" checkboxes unchecked by default on pages?

Combined with the answer mentioned by @developdaly, and you'll effectively turn comments off. <? … php add_action( 'init', 'wpse48145_remove_comments', 99 ); /** * Removes support for comments from Pages. …
Community's user avatar
  • 1
0 votes
Accepted

Display of comment_date within get_comments?

php foreach($comments as $comment) : echo "<li class=clearfix> <span class=comment-details>{$comment->comment_content}</span>"; echo '<span class=comment-date>' . get_comment_date( '', $comment …
chrisguitarguy's user avatar
1 vote
Accepted

disable defaault wordpress comments from a plugin

if you just want to disable comments. … Take a look at how the default comments compat file looks and you should get an idea about how you can do this in your plugin. …
chrisguitarguy's user avatar
5 votes

How can I remove the title "leave a reply" in the comment box in twentyeleven?

You can filter the default comment_form arguments (which is what's causing the "leave a reply"). Just drop this in functions.php or in a plugin file. It would probably be better to put it in a plugi …
chrisguitarguy's user avatar
6 votes
Accepted

Using filter to add additional fields to comment_form()

There are a couple other hooks in the comment form that you can use. Where you're hooking on only displays if the user isn't logged in. If you want that field for all users (logged in or not), you n …
chrisguitarguy's user avatar
1 vote

Allow tags between shortcode in comments

You want to allow folks to post code in their comments, like on here were we can just do <p>something</p> without having to worry about doing any &gt; or &lt; stuff? …
chrisguitarguy's user avatar
4 votes
Accepted

How to hack recent comments default widget?

foreach ( (array) $comments as $comment) { $output .= '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets …
chrisguitarguy's user avatar