WP Ajaxify Comments
[resolved] Don't want to scroll, and tell me how to use 'OnAfterUpdateComments' callback (3 posts)

  1. john.book
    Posted 3 years ago #

    Hi :)

    This is amazing plugin.Thank you for making this.

    My site has two comment forms per one singlepage.
    So, I changed the value for "Comment form selector" to "#commentform , "#tkform(this is commentform no.2)".

    It works both.

    But, I want to not scroll to commenthash when use commentform no.2.
    Because the position of #tkform is sticking rightside.
    How do I that? I tried fix scroll section in source, but it didn't work.

    AND, I made script for appending comment into my main of blog-sentents.
    I want to reflesh my script with ajax after people post comment.
    I dont know how to use 'OnAfterUpdateComments' callback.Can this do like that I want?
    Please, Show me the example using 'OnAfterUpdateComments' callback.
    Can I use for 'OnAfterUpdateComments' to "my_function();" in function.php?


  2. janjonas
    Plugin Author

    Posted 3 years ago #

    Hi john.book,

    thanks for your comment.

    Unfortunately there is no easy way to disable the scrolling functionality. Maybe I will add an option in a feature release. What you can do is to remove the id-attributes of the comment elements (by editing your theme). In result, the plugin will not find the comment elements which disables the scrolling functionality.

    The OnAfterUpdateComments is a client-side event, i.e. you can define some JavaScript code that should be executed. To call a server-side php function you need to make an AJAX call in the OnAfterUpdateComments that executes some server-side code and here you can call your my_function(); method.

    Hope this helps...

  3. janjonas
    Plugin Author

    Posted 2 years ago #

    Unfortunately, I did not get any feedback. Please feel free to reopen the thread if you need further assistance...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Ajaxify Comments
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.