• When using Co-Authors Plus there’s an odd issue. I try to hide the Co-Authors block when the post is made by one specific user.

    But this hides the block regardless of who the author of the post is. It works as expected if I use the regular wordpress Author blocks, (even if I have Co-Authors installed), but not with plugin-specific blocks.

    Why does this happen? What can I do to fix this? As Co-Authors Plus is not the best supported (despite a recent update) at the moment I have to do some of the fixing myself.

Viewing 1 replies (of 1 total)
  • Plugin Author Nick Diego

    (@ndiego)

    Hi @audunmb,

    Sorry for the delayed reply. Block Visibility fetches the author id using get_the_author_meta( 'ID' ) and the id of the current user using get_current_user_id(). The code is here.

    I tested with the Co-Authors Plus and it looks like whoever it listed first as a co-author has their id returned from get_the_author_meta(). So without a custom extension, I don’t think Block Visibility will work with Co-Authors Plus because there needs to be a custom method that detects all the co-authors.

    Furthermore, I ran into some weirdness with the plugin. The “Co-Author Name” block doesn’t seem to work at all, with or without visibility conditions applied. I was able to get the “Co-Authors” block to work, but again, Block Visibility only detects the actual author of the post, which seems to be the first co-author listed.

    Let me know if I can answer any additional questions.

    Best,
    Nick

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.