Tag Info

New answers tagged

2

Not too sure what is really going on there, but one thing for sure your if statement is flawed, you should remove unneeded ELSE, should be like this: if (is_user_logged_in()) { if (isset($_GET['id'])) { $id = $_GET['id']; show_submission($id); } elseif(has_submission()) { $url = ...


0

I found a plugin to get my requirement,it is managed using cookies we need to provide Welcome URL A.K.A firstpage in my case and them we need to select which page should be redirected for second time.


0

Use template_include with your conditional for first time visitor: add_filter( 'template_include', 'first_time_visitor_template', 99 ); function first_time_visitor_template( $template ) { if ( // your conditional for first time visitor { $new_template = locate_template( array( 'first-time-template.php' ) ); if ( '' != $new_template ) { ...


0

Put below code in theme functions.php:- add_action('template_redirect','wdm_redirect'); function wdm_redirect(){ $ip = $_SERVER['REMOTE_ADDR']; $value = get_option($ip); if ($value == '') { update_option($ip,1); wp_redirect(site_url('first-page')); exit(); // always use ...


0

The answer below doesn't directly answer your question but provides a possible alternative solution. Drop has_shortcode( $post->post_content, 'my-shortcode' ) statement. There is no need to check this if you are validating nonce. So the validation should look something like this. function project_registration_login_redirection(){ if ( !isset( ...



Top 50 recent answers are included