Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #1061412

    I would like to add comments to posts build with ALB, but not in the Backend.
    Right now I’m using a function which hooks to ava_before_footer to add additional content to a an ALB post.
    Comments are only working, if I add them in the Backend (ALB Element).

    But they are not working if for example I add them to my function like this:
    echo do_shortcode("[av_comments_list av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='' av_uid='av-1w2tnu']");
    or like this:
    comment_form( $args, $postid );
    or like this:

    I’m guessing it has something to do with the av_uid which has to be assigned somehow.
    Really need advice here. Thanks!

    EDIT 1: to be clear…”do_shortcode” shows the comments, but NOT the comments form. also it shows “comments are closed” even if they are definitely not.

    EDIT 2: here it says:
    [av_comments_list av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='' av_uid='av-79s2f5']
    which is exactly what I’m trying.

    • This topic was modified 5 years, 2 months ago by freddyB.

    Hey freddyB,

    Thank you for using Enfold.

    Post the whole snippet that you’re using on so that we can test it on our end. Did you enable the “Allow Comments” option for the posts?

    Best regards,


    Hey Ismael,

    this is what I put in functions.php:

    The result is very strange. It outputs the comments BUT NOT the comment form. Instead it shows: comments are closed.
    (also tested with comments_open(), which returns FALSE)
    But comments are 100% open.
    “Allow Comments” is set to TRUE in the post settings. (even checked it in the database)
    Discussion is also enabled sitewide.
    Latest WP and Enfold.

    It has to be something with ALB mode.
    Only if I add a Comments sections in the Backend the do_shortcode one in functions.php is also working.



    Thanks for the update.

    This is probably an issue with a filter that the theme is using. Please add this in the functions.php file:

    add_action( 'after_setup_theme', function() {
          remove_filter( 'comments_open', 'av_comments_on_builder_posts_required', 10, 2 );
    }, 10 );

    Let us know if it helps.

    Best regards,


    Hi Ismael,

    yes, it’s working now. Thank you!
    Topic can be marked as solved and closed.



    Great! Glad it worked. Please feel free to open a new thread if you need anything else.

    Have a nice day!

    Best regards,

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Comments in posts with ALB through functions.php’ is closed to new replies.