how do i point to a new comment-reply.js (4 posts)

  1. kristinachilds
    Posted 3 years ago #

    I want to modify the core javascript that nests the comment reply form in the parent containing the comment being replied to. I've made a new file (/content/themes/mytheme/js/comment-reply-new.js) but for the life of me can't figure out how to tell wordpress to point to this file rather than the core file (/wp-includes/js/comment-reply.js)


  2. kristinachilds
    Posted 3 years ago #

    wait... is it comment-reply.dev.js that i need to modify? oh man, i'm so confused. all i want to do is to have the reply form nest UNDER the posted comment (the one being replied to) instead of INSIDE the posted comment bubble.

    I am modifying the twenty eleven theme.

  3. callummccormick
    Posted 3 years ago #

    Hello kristinachilds,

    Suggest you create a child theme first so that all your hard work doesn't get blown away next time you upgrade.

    Once you've done that, send a link to the issue since a picture is easier than words (well, for me it is on a Friday :)


  4. kristinachilds
    Posted 3 years ago #

    i already have, as stated above. the problem is that each theme is ulitimately linked to the core scripts, so how to i tell it for just this single script file to point elsewhere. i would imagine there's something you could put in functions.php, then call it in the header like this:

    if ( is_singular() && get_option( 'thread_comments','/pathtomynewscript.js' ) )
    wp_enqueue_script( 'comment-reply' );

    ...but then again i have no idea what i'm talking about.

Topic Closed

This topic has been closed to new replies.

About this Topic