francisco 4 years ago Try this in Post Lister code:
:VAR(USER_ROLE).IFMATCH(Admin).THEN.VALUE(true).SET(can_edit).NULL.ELSE.NULL;
:VAR(USER_NAME).IFEQ.VALUE(%username%).THEN.VALUE(true).SET(can_edit).NULL.ELSE.NULL;
:VAR(can_edit).IFEQ(true).THEN(<a href="/delete-post">Delete</a> | <a href="/edit-post/%id%/%title%">Edit article</a>).ELSE.NULL;
It will allow only Admins and the user who created the post to edit or delete it.
| comment |
i contact yoastseo development for my site upload to quicken show on Google within 1min after post so he gaven me the script link to copy and edit but i couldn't fix it please admin good i script editor lookforword to the God bless you all see link to script https://github.com/Yoast/javascript/tree/master/packages/yoastseo
| reply |