Tag Info

New answers tagged

0

Wordpress, by default don't enable comments on custom post types, and once you have added support for comments, you still get the following message: Comments are closed You have to basically manually visit each custom post and enable comments in the post editor screen. There are however a workaround to enable comments by default in bulk. You can use the ...


0

I should probably do <?php if( previous_comments_link() ) : ?> <li class="previous"> <?php previous_comments_link( __( '&larr; Older Comments', '' ) ); ?> </li> <?php endif; ?> <?php if( next_comments_link() ) : ?> <li class="next"> <?php next_comments_link( __( '&larr; Newer Comments', '' ...


0

Yes it is working 100%. Here is the total plugin if anyone else needs it... add_filter( 'comment_form_default_fields', 'wpse158195_comment_form_default_fields', 99 ); function wpse158195_comment_form_default_fields( $fields ) { global $current_user; get_currentuserinfo(); $post = get_post( $post_id ); // 'global $post;' may also work here if ( ...


0

There's probably a way to do this via one of the meta cap filters, but off the top of my head you could use the comments_open filter to check if the currently logged in user is the author of the post and change the output of the comments_open() function accordingly. I'm on the patio, so can't test, but something like this should work: add_filter( ...


0

Looks like this is a core issue with BP and only affects custom commenting like I did. I'm going to mark this as resolved as they're aware of the issue now.


0

All you need is to simply check if the entered name or email matched any admin accounts before the comment is saved. function restrict_admin_names() { if ( !is_user_logged_in() ) { $name = $_POST['author']; // Get Submitted Name $email = $_POST['email']; // Get Submitted Email $admins = get_super_admins(); // Get an array of ...


0

I think that the only way is moderate your comments or require user registration. Another solution could be install jetpack and let your users use their wordpress.com username (this can avoid registration in many cases). Another Trick that you can use to avoid spambot lets comment on old posts is close the comments about a post after n days


1

You were nearly there with your first piece of code. For this to completely work, you'll need to get a list of the comment classes and check your class against that list. If your class exists in that returned list, you can something, if not, do something else Use get_comment_class() to retrieve that list. Here is an example $classes = get_comment_class(); ...


0

There are probably several approaches to doing this. One approach would be to select the categories and comments divs in your theme and use css to remove them. Example: In your style.css .entry-utility-prep-cat-links { display:none; }


1

This will display them before the DISQUS comment form but not the count add_filter( 'comments_template', function( $pings_before_dsq_comments) { if( !function_exists( 'dsq_is_installed' ) || !dsq_is_installed() ) return $pings_before_dsq_comments; wp_list_comments( array( 'style' => 'ul', 'type' => 'pings' )); ...


0

I did not test the code. But you can try this code. $args = array( 'orderby' => 'date' ,'order' => 'DESC' ,'showposts'=>6 ); if( is_singular('post')){ global $post; $args['post__not_in'] = array( $post->ID); // Excluding the current post at post details page }


0

';' is missing in this line echo "<dt>$recent_date &nbsp; / &nbsp; <span class='comment'><a href='$recent_link#disqus_thread'>$recent_count</a></span></dt><dd><a href='$recent_link' title='$recent_title'>$recent_title</a></dd>" For this reason code is throwing the fatal error. Please ...


1

Livefyre Sidenotes plugin for WordPress does exactly this: https://wordpress.org/plugins/livefyre-sidenotes/ It enables contextual inline commenting not only per paragraph, but, within this, commenting on a particular section highlighted by the user, which would be closer to the MS Word implementation: Start by highlighting the text: When the ...


2

The plugin you mentioned is only a single function so it shouldn't be too heavy on your setup. It uses the comments_template filter to inject the pingbacks/trackbacks list into your page. But the plugin is using an extra manual SQL query and the template is constructed by hand, so there's a room for improvements/simplifications. A simple demo plugin with ...


0

It does seem that you are already using a custom function that you found from this site. You should credit the original author of that code. The widget_comments_args filter was introduced in Wordpress3.4. This filter is poorly documented. This filter uses get_comments(), so you can also use the same parameters. Here is the filter in ...


0

Use the widget_posts_args to modify the args in the get_comments functions for that default widget. Something like this: function wpsites_widget_comments_args( $args ) { $args = array( 'post_type' => array( 'attachment', 'post', 'page'), 'number' => $number, 'status' => 'approve', 'post_status' => 'publish' ); return $args; } ...


6

Pingbacks/Trackbacks: This is most likely a harmless case of link notifications to your blog (A) from the other blog (B), where: the comment_author_email field is usually empty, the comment_type field is either pingback or trackback, the comment_author field has the form: The title of the post that contains a link to a post of blog A | The site ...


0

It turns out that the problem was the JetPack overlay comments. The link was tied to wordpress.com. I simply unlinked the account, reinstalled jetpack and relinked using the new domain name.


0

Some plugins and I guess themes save the initial URLs and paths in their configuration files. If you checked the DB and especially the options table and haven't found their any mention of the old domain, then you should also search for it in the source files. It is probably best to simply download the wp-content folder to your PC and use a search tool to ...


0

Short answer: Add comments_template(); under your the_content(). But there's a better way to do this that will carry over any formatting and style you have on your main blog. Maybe you don't want this, though, so ignore the rest if needed. Here's the improved loop code: $args = array( 'numberposts' => -1); $query = new WP_Query($args); if ...



Top 50 recent answers are included