[WordPress] Add Custom Links to User Row Actions

While working on a user badge system for the CG Cookie network, I came across the need to add a custom link to the action links, such as Edit and Delete, present for each user on the WordPress Users page. After a quick google search, I was able to find a simple filter than can be used for doing exactly this.

The user row action links I’m referring to are those shown in the screenshot below:

WordPress has a filter setup that we can use to add our own custom links, or even modify existing ones, and it’s called “user_row_actions”. You can see the source for the core function that sets up the action links here.

I wanted to add a “Edit Badges” link to the list of actions, and this was quite simply done with the following function:

with the following function:



Really quite simple, and the result looks like this:

Note, similar functions also exist for posts and pages:



Share this Post :

No comments yet.

Please Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *