Change order of switch for comments & add default case

  • Author
    Posts
  • #20866
    @phpcodemonkey

    When using plugins like ‘Social’ with Parabola theme you may find you’re not getting any comments displaying.

    If so change the switch statement layout in the includes/theme-comments.php file.

    Currently in the parabola_comment function (near the top of the file) it’s laid out like this:

    switch ( $comment->comment_type ) {
    case ”:
    …comment code…
    break;
    case ‘pingback’:
    case ‘trackback’:
    …comment code…
    break;
    }

    Change the layout to this and add a ‘default’ case:

    switch ( $comment->comment_type ) {
    case ‘pingback’:
    case ‘trackback’:
    …comment code…
    break;
    case ”:
    default:
    …comment code…
    break;
    }

    And all your comments should appear again, hopefully Cryout will adopt this approach in an update as it makes no sense to exclude the unknown types of comments by not allowing a ‘default’ state to apply.

    #20867
    @phpcodemonkey

    Apologies, indentation has been stripped by the forum – should hopefully still make sense though!

    #25790
    Zed
    Cryout Creations mastermind

    Thanks for the correction. This will be included in Parabola 1.4 (better late then never 🙂 ).


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Change order of switch for comments & add default case’ is closed to new replies.