By default, adding the embed code or a link to a YouTube video in a comment form, won't display your video because the oEmbed discovery for
Comments
Tutorials in this archive contain code which enables you to create your own list of comments or modify existing comments functions. The code uses get_comments
and WP_Comment_Query
. Other functions included in these tutorials include get_comment_date
, get_comment_link
and get_comment_author_link
.
Using get_comment_date & get_comment_time In A Custom Comments Loop
When using get_comments or WP_Comment_Query to code your custom comments loop, you can add the date and time using any format strings
Open Comments On All or Any WordPress Post Type Globally
Add this code at the end of your functions file or template to open comments. Works in any theme. If you enable comments on pages &
2 Ways To Modify The Leave a Comment Text in Genesis Post Info
Both code snippets in this download folder enable you to modify the "Leave a Comment" text which displays in the post info entry header when
Redirect Comment Authors Based On Date
The 1st code snippet in the download folder redirects your comment authors to a specific page on weekends only. The 2nd snippet in the
Load Comments On Click In Genesis
This code enables you to pre load any number of comments and then load more comments by any number on button click. In this example, 2
Customize The Post Authors Comments
This tutorial provides several methods which enable you to style or modify the default comment author if they are also the post
Conditionally Remove Leave a Comment Link In Genesis
This code enables you to remove the leave a comment link based on the comment count. In this example, the comment link is removed from the
Remove All HTML Tags From Comment Content Text In WordPress
A premium user asked how to remove links from comments which is the reason for publishing this code. Add the following PHP code to your
Remove No Follow From Comment Author Link & Comment Content Text Area Links
The code snippets in this tutorial remove the default rel="nofollow" from links added in the comment content area as well as the comment
Unlink Comments Link On Archives In Genesis
The code in this tutorial unlinks the comment count which uses the get_comments_link() function inside the post_comments shortcode so it
Hide Comments For Unregistered Users
This code enables you to remove the comments form and comments list for logged out users. Based on this question from a member of the
Template With Pagination To Get Comments From All Posts
This page template for Genesis displays all comments from all posts. You can also control which comments are displayed if needed and
Page Template For All Comments in Genesis
This template adds a new option to the Template drop down menu in the Page Attributes meta box located on all Edit Page screens. The
How To Modify The Output of Recent Comments Widget Default Parameters
This tutorial enables you to copy and paste code into your functions.php file to change the value(s) for any of the parameters used in the
How To Display A Custom Comments Loop
This tutorial provides the code you simply copy and paste into your functions file to display any comments anywhere in any theme. One
Remove Comments Form & Comments List For Logged Out Users – Plugin
This plugin removes both the comments form and all the comments for logged out users. To view the comments and submit comments, you must
Modify Comment Form Default Fields
Recently i was hired by a web designer to provide custom coding for their clients comment form. The client wanted to change the order of
Add Comments Form On Single Custom Post Type Pages
Generally, single pages assigned to a custom post type don't normally include a comment form. Update : This solution is no longer needed as
How To Remove Allowed HTML Tags Text After Comment Form Fields
One of the first things I noticed when converting my Genesis child theme from XHTML to HTML 5 was the changes to the comment form. By
You must be logged in to post a comment.