Tag Info

New answers tagged

1

First method, you are missing the second parameter for get_the_author_meta, which is the ID of the author. Second method, you are using undefined variables.. Check this code, should get you what you want. // Method 1 <ul class="authpcom"> <?php $queried_object = get_queried_object(); $author_email = get_the_author_meta( ...


0

There is no comment_ID until you are in the foreach loop. Try: $comments = get_comments($args); foreach($comments as $comment) : echo '<div id="' . $comment->comment_ID . '">Agent Name ' . $comment->comment_author . 'Phone' . $comment->comment_phone . 'Reply' . $comment->comment_content . '</div>'; echo get_comment_meta( ...


0

You get the comment_karma property because there is such a column in the comments table. It is meaningless and AFAIK was never used for anything except for maybe some random spam prevention plugin. It is there just for backward compatibility and because no one thinks that removing it will improve anything in a measurable way. You can use that field if ...


0

Finally I found a way and I am posting it here to address any further requests for such a workaround. You may add a customized version of comment_form_title function to your theme's functions.php file and call it in your theme's comments.php file. function my_comment_form_title( $linktoparent = true ){ global $comment; $noreplytext = __( 'Leave a ...


0

The previous answer is not working for me and I think it can not work for most people. Even if it works for someone, it overrides the WordPress configuration site-wide and it is not specific for the required custom post type. For me, the correct way to enable comments in a custom post type and remove the comments status meta box is something like this ...


0

I noticed that in the database comment_status for the posts were closed. This was because I published post via json rest api and by default the comments status were closed.... .


2

Add following code in your theme's functions.php. // To add extra column in column headers add_filter('manage_posts_columns', 'bs_event_table_head'); function bs_event_table_head( $defaults ) { $defaults['pending_comments'] = 'Pending Comments'; return $defaults; } // To add data in column for each post. add_action( 'manage_posts_custom_column', ...


0

See update and plug-in Git linked there. I'll link it again: The answer to the question is that comment_reply_link() may be the wrong hook. Full answer explained and implemented at https://github.com/CKMacLeod/WordPress-Nested-Comments-Unbound


0

You can try the following function: function enable_comments() { update_option( 'default_comment_status', 'open' ); } add_action( 'after_setup_theme', 'enable_comments' ); This should enable comments for all new posts. On the other hand have you checked your theme? Some themes for some reasons have build in functions that overrides the default WP ...


0

Post authors are notified of new comments by default; there are several plugins that modify this behavior. See wp_notify_postauthor. You can hook into comment_notification_recipients and add an aribtrary list of recipients as described here. Then you could create a metabox or dashboard widget to manage the recipient list. Keep in mind that this ...


0

You can use a function called add_post_type_support Hook into init after the post types have been created, and add support for comments. add_action('init', 'my_cpt_add_excerpt', 100); function my_cpt_add_excerpt() { add_post_type_support('mycpt', 'excerpt'); } ...where mycpt is the name of your custom post type. If you want to do it cleanly, you can ...


1

There are number of possibilities here: 1- Giving users the ability to edit posts and add notes. This is not something you want to do. As it might create many issues for you. However, you can use a Wiki plugin if you want to pursue this option. 2- Enabling notes through comments. This is a better option. You can handle user comments and ask whether he ...



Top 50 recent answers are included