This if statement is really wrong :
if (get_current_user_id()==1 or get_current_user_id()==2
should be :
$user_id = get_current_user_id();
if ($user_id==1 || $user_id==2 )
Related Posts:
- How to rearrange fields in comment_form()
- How to wrap submit button of comment form with div
- How can I limit the number of comments per registered user per day?
- What are the current recommended best-practices for comments.php?
- Showing comments only to same custom user role
- How to hide “Trackback” on paginated comments
- how to have 2 comments_template() in one post
- How To Remove The “Click here to cancel reply” Link From The WordPress Comment Form
- Passing arguments to wp_list_comments callback function
- customize comment form
- How can I show comments in random order?
- How to get last comments but not from admin (or other specific user role/capability)?
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, func
- What does the “$depth” parameter in the Walker_Comment stand for?
- Override comments.php template with plugin
- Add classname comment template from functions.php
- How to display nothing (instead default) when no user gravatar is present?
- Customizing comments pagination for bootstrap
- comment_post action hook running on page load instead of after a comment is posted
- using comments_template() in custom single-portfolio.php
- how to properly use comments-template.php
- WordPress comments – how to check if comment still needs to be approved?
- Modify WordPress Comment From For AMP Html
- comments_number not displaying
- How to make comments private for commentor and post author
- Name of comment field differs on different sites
- The comment could not be saved. No comment_ID on comments
- How to display comment meta under each comment content
- How can I embed comments plugin to my own website?
- Custom comment field not showing when logged-in
- Custom comment link
- Highlight comments made by registered users of the site
- infinite loop on page with comments after changing comments.php and header.php
- Removing comment option
- How to display replies to his comments in user profile of current user
- How to show a list of comments on home page from all posts?
- reply comment below the comment box without reload page
- How to call out the date of user’s first comment?
- How to pass settings to comment_form() if theme only uses comments_template()?
- How to add a class to comment submit button?
- How Can I display the Current Logged-In User’s Comment at the Top of the Comments Section in WordPress?
- Comments page id wp_list_comments
- reply to comment excerpt instead of author in comment title
- Redirect first time comments
- How can I fix the even/odd child classes comments so that the comments are unaffected by the top-level even/odd?
- Comment text area in single blog post and show comments if approved
- comment files and s
- How to maintain changes to comment-template.php
- Display Comment Form on dedicated Page for each post
- Commentform – Hightlight invalid fields instead of prompting towards error page
- Auto approve all comments (editor)
- WordPress is adding above html
- How do I get the comments section to show up?
- Display DISQUS on homepage
- The last comments of a post for the author of that post
- Get comments for more than one post
- “Categories” for comments?
- Allow anonymous comments, but prevent spam [closed]
- Where to remove from comment’s feed?
- Allow guests comments on single post
- Delete all user comments
- Delayed commenting
- “Leave a comment” link even when you can’t
- Display number of comment replies
- User can post only one comment per day on one page
- How to hide “Comments are disabled”
- WordPress comments just vanished even tho there are about 250+ of them. Where did they go?
- Restore trashed posts with comments
- How to import only certain comments from post[s]
- Sort/list/arrange comments by comment author in un-nested/no thread comments
- Get the top level comment ID
- Custom WP Comments Query with Nested Comments Possible? (Hierarchy/Depth)
- Log file reports SQL Error processing child comments
- Get Post ID within wp_set_comment_status hook
- get_comments not working consistantly with post_id
- Comments are invisible, what’s the problem with wp_list_comments?
- WP confusing “links to my articles” with “comments”?
- How to check if a comment has replies?
- Safe to remove this: when using a 3rd Party Comment App? [closed]
- How do I disable the discussion notification emails to us when a comment is “approved” and when an adiministrator replies?
- Moving post’s content to post’s comments section
- I need to disable Disqus comments pre-approval, but i can’t find where
- JetPack comment threads are displaying above comment box? [closed]
- Page comes up blank using w3 total cache [closed]
- Comment Table Size Results in Slow Page Loads and 500 Errors
- How to show username in reply to comment?
- Custom sort comments with select form
- Limit Comment Line Count – Add Read More Button
- Displaying comment rating stars in carousel
- Enable comments option
- Change Comment Text [duplicate]
- Comments closed but enabled on edit screen
- Let user delete comment on front end only
- add field comment [duplicate]
- Let users comment on categories in WordPress
- Loop not displaying comments_popup_link
- Display of comment_date within get_comments?
- prevent duplicate comments using wp_insert_comment
- comment awaiting moderation
- How do you fetch the authors email or IP from /comments? (REST API)