WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/get comments link

Description

The get_comments_link allows you to alter the link to the comments section of a post.

Usage

When the 'get_comments_link' filter is called, it is passed one parameters: the list item containing the powered by link.

add_filter( 'get_comments_link', 'filter_function_name', 10 );

function filter_function_name( $link) {
    // Manipulate comment link
    return $link;
}

Where 'filter_function_name' is the function WordPress should call when filter is run. Note that the filter function must return an value after it is finished processing or the result will be empty.

filter_function_name should be unique function name. It cannot match any other function name already declared.


Examples

Change Log

See Also