Copy and Paste Password for Comments

That is not a feature of WordPress. I have seen that particular wording before though. It is added by the “Spam Free WordPress” plugin. And yes, it’s not a great way to go. For spam prevention, I recommend using these plugins instead: Akismet Cookies for Comments Simple Trackback Validation

linking to an svg through comments_popup_link

The problem is the relative URL. You have to be careful with relative URLs in WordPress. Relative URLs are interpretted by the browser but the browser doesn’t know about the URL rewriting that happens behind the scenes. Think about where your index file appears to be– http://example.com/— vs. where it actually is– http://example.com/wp-content/themes/your-theme-name/index.php. Similar problems … Read more

Showing recent post of category in page

Here is a start. This is how I display related posts from the category the post are in. You will just need to add your own loop and CSS Create a template called content-related.php Inside that paste the following code <?php /** * The default template for displaying realted posts * * @package WordPress * … Read more

How to get comment_ID by post_ID in wordpress

Use get_comments( $args ) to get all the comments for a post. $args= array( ‘author_email’ => ”, ‘ID’ => ”, ‘karma’ => ”, ‘number’ => ”, ‘offset’ => ”, ‘orderby’ => ”, ‘order’ => ‘DESC’, ‘parent’ => ”, ‘post_id’ => 0, ‘post_author’ => ”, ‘post_name’ => ”, ‘post_parent’ => ”, ‘post_status’ => ”, ‘post_type’ => … Read more

How to Define Custom Number of Items in Comment Feed

There’s a filter for that! The filter comment_feed_limit can be used to adjust the LIMIT clause directly. By default, the option from Settings -> Reading is used (“Syndication feeds show the most recent”), but that’s used for other feeds as well. The comment_feed_limit filter is used exclusively for comment feeds. add_filter( ‘comment_feed_limits’, ‘wpse150187_comment_feed_limits’ ); function … Read more

Comments_template doesn’t work

Seems to me like you are trying to use the comments template out of context. The codex states: Loads the comment template. For use in single Post and Page displays. Will not work outside of single displays unless $withcomments is set to “1”. Unless you have a is_single() on the index.php or use the $withcomments … Read more

Adding comments section to website integrated WordPress instance

Could be as simple as using the full function in the template file: <?php comments_template( ”, true ); ?> Be sure you have a comments.php file in the theme folder. And be sure you’re using the full loop: <?php require(‘/the/path/to/your/wp-blog-header.php’); ?> <?php $posts = get_posts(‘numberposts=10&order=ASC&orderby=post_title’); foreach ($posts as $post) : setup_postdata( $post ); ?> <?php … Read more

Display on page every post in blog WITH comments

Short answer: Add comments_template(); under your the_content(). But there’s a better way to do this that will carry over any formatting and style you have on your main blog. Maybe you don’t want this, though, so ignore the rest if needed. Here’s the improved loop code: $args = array( ‘numberposts’ => -1); $query = new … Read more

counting trackbacks, pingbacks and comments of a post

I think you can use get_comments. In the type parameter you can pass the type of comment (trackback, ping), you can filter by status, and you have a parameter called count, that when is set to true returns just the number of comments that match the parameters you passed. get_comments( array( ‘status’ => ‘approve’, ‘post_id’=> … Read more