Fetch URL parameter
-
I have an URL
https://127.0.0.1/wordpressbosta/team/?team=teamOne
.I would like to fetch
team
valueteamOne
infunctions.php
like below.function get_data() { echo json_encode($_GET['team']); die; } add_action('wp_ajax_get_data', 'get_data'); add_action('wp_ajax_nopriv_get_data', 'get_data');
But it is not working.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Fetch URL parameter’ is closed to new replies.