I am running a site where users can find great information about musical artists and their releases. Each release is a wordpress post. Each artist is a wordpress post. In my single-artist.php and my single-release.php, i use comments_template(); EDIT: here is my comments.php comment_form(); if (have_comments()) : $wantto= get_comment_meta( $comment_id, 'wantto', true ); echo '<ol class="post-comments">'; wp_list_comments(array( 'style' => 'ol', 'short_ping' => true, )); echo $wantto; echo '</ol>'; endif; It just shows a text box. Here's an example of a …
Just like WP posts have title and text, I want to have titles to my comments. Now how do I add it and show them above the comment texts like a title. I need it to have a css name as well. The title needs to be H3.
One can customize single comment markup using the callback argument in wp_list_comments like this: $args = array( 'callback' => 'my_callback', 'avatar_size' => 48, 'type' => 'comment' ); wp_list_comments( $args ); The question is, how to pass arguments to that my_callback function? Already it gets three: function my_callback( $comment, $args, $depth ) But I need to add my own 4th argument
I am trying to make comments private. I mean comment must be visible for post author and comment author. I create custom comment section "better-comment.php". I have used pre_get_comments but I can not make work. Please help <?php // My custom comments output html function better_comments( $comment, $args, $depth ) { // Get correct tag used for the comments if ( 'div' === $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = …
I've been messing around with custom comments this week and I'm trying to figure out when I'd want to use a walker and when I'd use a callback... There's some things I can't quite figure out how to change, but the one that's been driving me mad is how to add classes to the children <ul> tag: <ul class="children"> Are there certain things a comment walker can do that a comment callback can't?... or vice-versa? And is one of these …
I have a question regarding the „name“ of the comment field of wordpress blogs. I have 2 sites, that are just available locally on my LAN. On the first site, if I inspect the comment field in firefox, I see: <textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" required="required"></textarea> On the second site I see: <textarea autocomplete="new-password" id="comment" name="i817ab2c85" cols="45" rows="8" maxlength="65525" required="required" spellcheck="false"></textarea> Can anybody tell me, why the name of the comment field differs on the second site? Both sites …
I can delete the comment from the database with this code, however when the page is loaded again the comment will still be there. I need to update again to disappear. How do I resolve this? <?php if( 'POST' == $_SERVER['REQUEST_METHOD'] ) { set_query_var( 'commentid1', $_POST['commentid'] ); wp_delete_comment( get_query_var( 'commentid1'), true ); }; ?> <form class="delete-comment" action="" method="post"> <input type="hidden" name="commentid" value="<?php comment_ID() ?>" /> <p align="right"> <input type="submit" value="Delete" title="Delete" /> </p> </form>
i want to pin all comments from post with commentmeta = 'spolie' on the top of my comment list in post. Quite similar to Instagram pin comment or wpdiscuz pin comment; Can someone help me. tnx :)
We use careerfy theme WordPress which is a system for a job board. I would like to enable comments for each job post page, these pages are not listed on the WordPress admin panel, I can access it via child theme only, in this path: (wp-content/themes/careerfy-child-theme/wp-jobsearch/detail-pages/job/view3-job.php) I have tried to add a shortcode but it seems not working.
I need to put the name of the author who wrote the post and I can't find the solution. EXAMPLE: Rachel [06/03/21] : Commented in the post "How to be a Web Designer", written by: POSTAGE AUTHOR - Test Comment <?php $args = array( 'user_id' => bp_current_user_id(), 'number' => 20, // how many comments to retrieve 'status' => 'approve' ); $comments = get_comments( $args ); if ( $comments ) { $output.= "<ul>\n"; foreach ( $comments as $c ) { $output.= …
I am creating a reviews site and I want to display the customer reviews (comments) on a separate page from the single-restaurant.php. I'll just have a link that says (Read reviews/ add yours). I created a custom comments template and called it comments-side.php and this is what I have in it: <?php /** * Comments Template * */ ?> <div id="comments-template" class="comments-side"> <div class="comments-wrap"> <div id="comments"> <?php if ( have_comments() ) : ?> <?php do_atomic( 'before_comment_list' );// supreme_before_comment_list ?> <ol …
What is the cleanest way to display a text message beside the submit button like this in screen shot: I am currently doing it by editing the file wp-includes/comment-template line 1577 (wordpress 3.5) before: <input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" /> after: <input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" /> (your message will only be visible after moderation) I understand this is not …
Is this possible? I'd like to go into wp-admin, click on a comment and give a class for a specific comment. Would it be possible to do so? If so, could you please help?
i need to add a privacy-checkbox to the file comment-template.php. I created the checkbox and a paragraph and it looks fine, so far. <input type="checkbox" name="privacy" value="privacy-key" class="privacyBox" aria-req="true"><p class="pprivacy">Hiermit akzeptiere ich die <a target="blank" href="http://wp.cloudstarter.de/?page_id=156">Datenschutzbedingungen</a><p> Now, i want to connect this checkbox with the submit-button, so that a user HAS to accept the privacy to comment on a post. Anyone with a clue how to do that? Or it there a plugin, which delivers this services?
Typically I don't utilize comments on my sites, however I'm using the comments functionality as a sort of live-feed testimonials page. To do this, I've borrowed comments.php and the comments portion of functions.php from the TwentyEleven theme. What I'm currently struggling with is how the comments/form are displaying on the site Ideally, I'd like the form to be on the left (inside .content-left) and the list of comments to be on the right (inside .content-right). Currently, the list of comments …
I am using a theme that has an okay comment template that I would not want to change. However I just want to insert voteup and votedown button directly below the User avartar <ul class="comment-list"> <?php wp_list_comments(array( 'style' => 'ul', 'short_ping' => true, 'avatar_size' => 70 )); ?> </ul> I saw a suggestion to add a callbackfunction that would create a new theme. Using this SO here. <?php wp_list_comments(array( 'style' => 'ul', 'short_ping' => true, 'avatar_size' => 70, 'callback' => …
How to display list of replies to his comments in user profile of current user. my website can send notification that example: "someone replied to your comment" and when i click the link that was sent by notification email it forward me to comment page. i also want to list these replies in user profile. thanks for attention
I have a custom post type for games on my site (https://pokerdiy.com). I have comments on these games and now want to show a list of recent comments on the home page of my site (kind of like the Facebook wall) to show the activity that is going on. I am using Elementor and want to be able to style it. I tried to use the Posts Elementor block but this does not allow the selection of Comments. Any suggestions …
I make a comment form before comment list and I want to show a comment form inside the comment box that chose to reply without refresh the page the website I inspired the idea Novin.com