Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    I added the author parameter in the latest update. To display comments from posts by current author, you can use: [comments author=this]

    Thread Starter cutup01

    (@cutup01)

    Total Awesomeness!!!!!
    Thank you so much! There’s one more thing I should ask.

    I want to get comments from posts of certain tag OR written by this user, so same comments are not repeated.
    Is there a way to add “OR”?

    [comments tag={USER_FIELD} author=this]

    Plugin Author Eliot Akira

    (@miyarakira)

    Unfortunately, there’s no way to add OR because all the given parameters are used to query the comments.

    I added a new function for checking the post author inside comments:

    [comments tag={USER_FIELD}]
      [if author=this]
        ...
      [/if]
    [/comments]

    BUT, I see now that this will have the same result: matching both tag and author.

    I thought perhaps a nested loop might work, if there was a way to do:

    [comments tag=..]
      ...
      [if empty]
        [-comments author=this]
          ...
        [/-comments]
      [/if]
    [/comments]

    BUT, this will work only if the first comments loop is empty, then it will check for current author.

    So..I think there’s no simple way to do this without resorting to PHP. It will be necessary to combine the results of two comments queries.

    Thread Starter cutup01

    (@cutup01)

    Okay, I will need to find the PHP way.
    Thanks a lot!!! ??

    Thread Starter cutup01

    (@cutup01)

    .

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Comment filter by author’ is closed to new replies.