Good day sir please how can I pass query parameter in wp_logout_url(). This what I want to achieve localhost/WordPress/wp-login.php?action=logout&_wpnonce=243b04g7ee&user_id=1 Even when the link is hovered it should not show the custom logout url which is localhost/WordPress/wp-login.php?action=logout&_wpnonce=243b04g7ee Please how can I achieve that
assign wp_logout_url() to a variable and then pass arguments in an array format which you want to pass as query string as shown in this video at 05:00 timestamp > ruclips.net/video/8_TEsnP8Bjc/видео.html
@@BuntyWP this my functions.php add_action('init', function () { if ($_GET['action']='logout') { $current_user = wp_get_current_user(); $wp_logout_url = wp_logout_url(); $new_url = add_query_arg('gide', $current_user->ID, $wp_logout_url); return $new_url; } }); after refreshing the page when and i inspect the page it showing Log Out
@@tochukwuokafor1251 So above solution didn't work? OR may be I couldn't understand your query properly. by add_query_args you can add as may query strings as you want to any url.
Thanks for watching! Don't forget to subscribe and follow me on Twitter and Instagram. Links are in the description.
Good day sir please do you have tutorial for lms to show student, instructor and admin and it's features without the use of plugins
Sorry, I don't have that.
@@BuntyWP okay thank you sir
bro. how do you redirect to page using this command
Use this function to redirect developer.wordpress.org/reference/functions/wp_redirect/
Good day sir please how can I pass query parameter in wp_logout_url().
This what I want to achieve
localhost/WordPress/wp-login.php?action=logout&_wpnonce=243b04g7ee&user_id=1
Even when the link is hovered it should not show the custom logout url which is
localhost/WordPress/wp-login.php?action=logout&_wpnonce=243b04g7ee
Please how can I achieve that
assign wp_logout_url() to a variable and then pass arguments in an array format which you want to pass as query string as shown in this video at 05:00 timestamp > ruclips.net/video/8_TEsnP8Bjc/видео.html
@@BuntyWP this my functions.php
add_action('init', function ()
{
if ($_GET['action']='logout') {
$current_user = wp_get_current_user();
$wp_logout_url = wp_logout_url();
$new_url = add_query_arg('gide', $current_user->ID, $wp_logout_url);
return $new_url;
}
});
after refreshing the page when and i inspect the page it showing
Log Out
i would like it to look like this
Log Out
@@tochukwuokafor1251 So above solution didn't work?
OR may be I couldn't understand your query properly.
by add_query_args you can add as may query strings as you want to any url.
@@BuntyWP yes I didn't work