Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Kamuran Bildircin

I need _wpnonce in a link

Hi. I’m including some links in the user list, for example to call up the multisite usersite (frontend), or the WP Ultimo customer view. Everything works wonderfully – partly with ACF. Now, however, I need the _wpnonce for a link. How could I attach it? Would it be possible to use a (own generated) shortcode?

Actually I am using: Custom field: user_id

<a class=”action” href=”

&nr=1&_wpnonce=????????” target=”_blank”>Login

Thankls and regards,

2 years, 10 months ago
Kamuran Bildircin

Hi Stefan,

Thank you very much, but to be honest I don’t really understand this.
Is there somehow maybe a really simple example where in a user list a column XYZ is filled with any text?

>> I’m always surprised about the creative ways our customers use the before and after settings :)
I can give you more of them ;-)

Thank You!

2 years, 10 months ago
Stefan van den Dungen Gronovius

Something like this should work (not tested):

add_filter( 'ac/column/value', function( $value, $id, AC\Column $column ){
	if( $value && $column instanceof AC\Column\CustomField && 'user_id' === $column->get_meta_key() ){
		$nonce = 'nonce'; // populate with nonce
		$value = sprintf( '<a class="action" href="" target="_blank">Login</a>', $value, $nonce );

	return $value;
}, 10, 3 );
2 years, 10 months ago
Kamuran Bildircin

Hello Stefan,

Thank you. But I am too stupid.

My very simple code for testing:

My column:

What am I doing wrong?

Thank You!

2 years, 10 months ago

You must be logged in to reply to this topic.