Recent Comments with Blog Type

If I want to use the Recent Comments Plugin in conjunction with the Blog Types plugin to only display comments from a particular blog type (in this case, “leadership_development”:wink:, I assume I insert a line of code like this into the Recent Comments plugin, but it’s not working correctly for me:

$query = "SELECT * FROM " . $wpdb->base_prefix . "site_comments WHERE sort_terms LIKE '%|blog_type_leadership_development|% ORDER BY site_comment_id DESC LIMIT " . $tmp_number;

Any hints?

  • Andrew
    • Champion of Loops

    Hiya,

    I assume I insert a line of code like this into the Recent Comments plugin, but it’s not working correctly for me

    You need to edit the query, not add a line :slight_smile:

    Edit the query on line 133 replacing this:

    WHERE

    With this:

    WHERE sort_terms LIKE ‘%|blog_type_leadership_development|%’ AND

    Thanks,

    Andrew