How can I implement that in my example?
Thank you very much 🙂
I have one more question…
I made this code. When an admin is logged in, there will be an input box to response to a review. How can I save the response into the database, when the form is submitted?
<?php
$current_user = wp_get_current_user();
if (user_can( $current_user, 'administrator' )) { ?>
<form autocomplete="off" action="/post-comment.php" method="post">
<div>
<input type="hidden" id="reviewid" name="reviewid" value=<?= $postId = $review->ID; ?> readonly>
<input type="text" id="comment" name="comment" placeholder="Indtast dit svar til overstående review">
</div>
<input type="submit" value="Indsend">
</form>
<?php } ?>
-
This reply was modified 5 years, 10 months ago by digitali17.