WordPress.org

Ready to get started?Download WordPress

Forums

Chage #comment-XX into #anything-XX (3 posts)

  1. Ingenius Dastard
    Member
    Posted 6 years ago #

    I managed to change the ID's on comments that start with "#comment-XX" but the only part I cannot figure out is how to tell WordPress to redirect to this customized ID upon comment addition. It seems to still go to the #comment-XX ID's.

    Anyone interested in customizing WordPress that deep?

    Thanks!

  2. Pinoy.ca
    Member
    Posted 6 years ago #

    I grepped the wordpress files and folders for "#comment-" and found 9 occurrences, including

    /**
     * get_comment_link() - Retrieve the link to the current comment
     *
     * @since 1.5
     * @uses $comment
     *
     * @return string The permalink to the current comment
     */
    function get_comment_link() {
    	global $comment;
    	return get_permalink( $comment->comment_post_ID ) . '#comment-' . $comment->comment_ID;
    }

    in comment-template.php. Go change all of them, if you want.

    If this helps you out, I invite you to check out my profile page.

  3. Ingenius Dastard
    Member
    Posted 6 years ago #

    Thanks for your response.

    I actually found that one myself and changed it. But there must be something else in the core files. Oh well, when I find it I'll post back here.

Topic Closed

This topic has been closed to new replies.

About this Topic