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
- Why does the reply link in comments template scroll to comment position?
- Make comment textarea input un-required
- Nofollow the date/time hyperlink in comment
- How do I comment out a block of tags in XML?
- R: Comment out block of code
- Why do I get comment spam even with Akismet and Captcha?
- What tools are available for managing/writing to WordPress? [closed]
- setting comments off as default for pages and custom post types?
- Is it possible to pull comments from facebook into your blog?
- Filtering the Admin Comments List to Show Only Comments from the Current User?
- Non-threaded comment replies with link to original comment
- Approve comment hook?
- Commenting in user profile page?
- How to change “You must be logged in to post a comment.”
- comment_post_ID 0 (cannot remove from dashboard)
- Disable comments on all posts/pages
- How do I delete all comments from a specific old blog post?
- Change HTML Produced by wp_list_comments()
- Removing the “Website” Field from Comments and Replies?
- Stop WordPress redirecting comment-page-1 to the post page?
- Importing old Disqus comments into WordPress
- How to add a class to the comment submit button?
- How to enable comments for pending and draft posts?
- Using WordPress’ WYSIWYG for comments
- Enable Submit Comment Without Page Reload (Using Ajax)?
- What for is the table “wp_commentmeta” exactly?
- Comment Walker vs. Comment Callback
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- Add option to disable comments on a per posts basis?
- Resetting comment count
- When importing – failed to import: Invalid post type feedback
- How to change the email notification recipient (user) for new comments?
- Redirect user to a custom url after submitting the comment
- Paginate result set from $wpdb->get_results()
- Change Comment Author Display Name
- Would switching to InnoDB from MyISAM improve performance of comments table?
- Custom comment type based on thread level
- How to add internal, revision comments to page updates
- How to load and show comments with AJAX instead of pagination?
- Linking to Page Showing Only Comments Without Parent Post
- Comment Reply javascript
- How do we remove the H3 tag for the reply-title I.D
- Comments not appearing at all
- comments reply script not working
- How to display comment form error messages in the same page