using this
header("Location: http://example.com/myOtherPage.php");
die();
this redirects the page to whatever link we put there, if we want to choose depending if is one or another, its possible to use this inside a if statement. I only do not put the code here cause I do not full understand the code above…, but I would do it this way
Related Posts:
- Masking logout URL
- Logout/login redirect CSS issue
- Paged Single Post doesn’t redirect to the main url after Removing Pagination
- redirect wp-login.php to another page
- How do I redirect upon login a specific user based on role?
- Ninja form Redirect depending on text field content [closed]
- Redirect specific page in WordPress for first time visit
- How do I redirect all 404 error url to Subcategory url
- 404 redirect to previous category
- Login Redirect if Logged in from Specific Page
- Redirect to another page if the user is logged in when pressing again the login button on menu bar
- Incorrect redirect after commenting
- How i can put $_GET codes in function.php?
- Why does get_template_directory_uri() not include “www”, only for enqueued stylesheets?
- Page get parameter doesn’t work with is_single() function
- Redirect website domain (including all pages) to external URL after Popup message (few seconds)
- Contact Form 7 If Condition
- Solved: redirect to another page using functions.php
- Redirect to other page if login
- Logout Redirect and also WP-login.php Redirect
- How to add array [closed]
- WordPress website keeps loading the maintenance page
- Redirects based on a JSON file
- template_redirect action only firing if logged in
- How to redirect Subscribers on login to specific page, when logging in from a Page
- Wildcard 301 Redirect Using Theme Function
- Competing Login Redirects – Need to be Combined?
- Postback redirect through add_action is not triggered
- Restrict access if logged out except for homepage
- Redirect specific author posts to another url
- Custom download page
- How to create a function to redirect a specified page to another page
- Language switcher for subdomains
- Allow the access over wp-login.php
- How to request login for user but not for bots
- Making an under maintenance page (without using plugins)
- Template Redirect Function Only Working When Logged In
- Disable Attachment Page Except for Category
- How to override parent functions in child themes?
- Define page template in wp_insert_post
- Get a list of all available fields in the User Profile
- How do I use the WP image functions in a page template?
- How to remove Customize from admin menu bar after WP 4.3
- Child theme functions.php do I use php open and close tags?
- why doesnt is_home() work in functions.php
- Enabling shortcodes for custom fields
- Passing variables to templates (alternatives to globalizing variables)
- Load post with a different template?
- Add options to featured image
- Dynamically Register Sidebars For Each Top Level Page
- Run Product Filter Javascript On Page Template
- Most efficient way to get custom database records from 20 buttons and 20 tables?
- How to add a column to the Trash page?
- Images uploaded using media uploader are appearing upside down
- Empty Date Returned on my function
- Woocommerce Attributes pulling in wrong data
- How to get the post_name when in preview?
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- How to hook into a function offered by a plugin?
- Echo tags used to describe the theme
- Change position of media in admin menu
- How to Display Frontend CSS for Administrator only
- How can I change a function in a parent theme via a child themes functions.php
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- Automatically assign video ‘poster’ value to ‘filename’ for archive listing
- Where to add the permalink in this function?
- Change CSS for logged in users
- Always the Latest google jQuery instead of default WordPress jQuery
- if statement for wordpress default featured image on single post
- Function to display post by specific author
- Override the WordPress core function wp_referer_field
- Return category name with & Ampersand doesnt work
- Control the srcset much more (not all sizes in it each time)
- Warning: join(): Invalid arguments passed in post-template.php
- javascript and css links not working on sever
- is_page() or is_single not working
- What are the meta fields for an attachment?
- Can’t locate custom image sizes defined by child theme
- how to change “posted by” words
- Add attribute only to first image of every post via functions.php
- Add loggedout class on body using a function or JS
- Default click “I have read and agree to the website terms and conditions”
- How to use wp_enqueue_script properly?
- Run function with schedule is not working correctly
- Issue passing action class to nested function. Admin Columns
- Populate Product Regular Price with a calculated ACF Field Value
- Header menu aligned right on all pages except for single-post page [closed]
- Auto remove tags on certain date
- get_field() with ID in one signal filter not working
- Remove External Links from WordPress posts Using add_filter() in Theme functions.php
- Is there any requirements to do socket programming with WordPress?
- Adding A New Widget to WordPress Disables the Existing Widgets
- same get_posts function works diffrently in tag.php and functions.php
- Call custom field using php
- Problem in outputting shortcode
- add_theme_support not outputting thumbnails
- How to get tags and categories?
- update_user_option not working as expected
- How do I access variables outside a function [closed]
- Different ads on every website on multisite environment