Tag Info

New answers tagged


You should get ID of the page you're looking for: $page = get_page_by_title('thank-you'); wp_redirect(get_permalink($page->ID)); exit; It looks like you want to get page by slug. If that's the case, you should use this function instead. Also, for Location header don't use space after "Location" string: header("Location: http://localhost/mysite/faq"); ...


Hello i have used bellows code redirect after plugin activation. You can use this code. It's working nicely. register_activation_hook(__FILE__, 'nht_plugin_activate'); add_action('admin_init', 'nht_plugin_redirect'); function nht_plugin_activate() { add_option('nht_plugin_do_activation_redirect', true); } function nht_plugin_redirect() { if ...

Top 50 recent answers are included