Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #28372

    Hey I seem to have lost the comments section for my custom post “scroll” after the last update. I managed to get it on the “portfolio” post.

    To the template-builder.php file before line 56 I added

    if (is_singular(‘portfolio’, ‘scroll’)){ comments_template( ‘/includes/comments.php’);}

    Is there something I am missing?

    #137372

    ?

    #137373

    The line:

    if (is_singular('portfolio', 'scroll')){ comments_template( '/includes/comments.php');}

    doesn’t seem to be valid because is_singular just accepts an array or a string. You can use

    if (is_singular('scroll')){ comments_template( '/includes/comments.php');}
    if (is_singular('portfolio')){ comments_template( '/includes/comments.php');}

    or

    if (is_singular(array('portfolio', 'scroll'))){ comments_template( '/includes/comments.php');}

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘add comments to custom post’ is closed to new replies.