WordPress show Edit and Delete buttons only if post’s author

My wordpress site uses post submissions (actually, CPTs) from site members. When displaying the CPT post, I'd like buttons to appear for Edit and Delete when the author is viewing the post, and not appear if any other member views the post. I've researched code and plugins, but all seem to only apply to the author role, not the specific author themselves. Is there a way to use PHP function/shortcode, Javascript, or some combination of the two, to add this functionality?



Read more here: https://stackoverflow.com/questions/68463099/wordpress-show-edit-and-delete-buttons-only-if-posts-author

Content Attribution

This content was originally published by BrianWent at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: