The problem was with WP-Super-Cache plugin. When I was logged in, it wasn’t serving me a cached file, so my template redirect was being executed. Not sure if this is a known liability with WP-Super-Cache.
My solution was to make a template for page-testimonials.php where I set up my PHP redirect. After flushing the cache, the redirect works.
Related Posts:
- Redirect to another page if the user is logged in when pressing again the login button on menu bar
- Postback redirect through add_action is not triggered
- Remove Actions/Filters added via Anonymous Functions
- Check if post is being published for the first time, or is an already published post being updated
- How to use the do_action () with parameter
- WordPress Theme Update Action?
- Extract image from content and set it as the featured image
- Do WordPress’ cron’s clean up expired transients?
- Using a private method as an action callback from within a class
- Refresh page after form action
- How to restrict actions and filters “properly” by conditions
- How to count number of functions attached to an action hook?
- Masking logout URL
- Using add_filter() in Widgets
- 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
- Using get_terms for custom taxonomy in functions.php
- Fatal error: Call to undefined function add_action() – an untouched problem
- How to hook into the quick edit action?
- Call to undefined add_action() in theme’s functions.php
- How do I redirect upon login a specific user based on role?
- WooCommerce add_action hook results in 500 error
- Automatically Add Specified Value to Attachment Metadata upon Upload
- Can’t Update function.php after writing short code
- How to update feed only 2-3 times a week (for Feedburner email)?
- How would go about if I just want a temporary function?
- Passing arguments to my function with do_action and add_action is not working
- Pass parameters to function through an action
- Accepted arguments value in hook functions
- How to select a page within admin?
- How to manage arrays from custom functions stored in functions.php?
- How do I pass arguments for multiple functions hooked to a single action?
- Which action hook to use for function?
- Ninja form Redirect depending on text field content [closed]
- Custom HTML in specific category single page and its descendant categories
- Redirect specific page in WordPress for first time visit
- How do I redirect all 404 error url to Subcategory url
- Modify a function without editing template
- Don’t delete a page if it holds users
- Which action does wp_update_user triggers?
- Trigger a custom function when option are saved in admin area
- Login Redirect if Logged in from Specific Page
- Is there an alternative to get_template_directory_uri()?
- Reuse variable in hook callback
- Difference b/w Simple function call & do_action call
- Set Taxonomy based on post status
- add_action template_redirect not working for home page
- I can’t seem to install Font Awesome locally [closed]
- AMP – Change rel=”canonical” from functions.php [closed]
- Is there a way to prevent a function/method from being called outside a specific hook?
- Auto-Tweet if Type is ‘Status’ using OAuth
- Missing argument for the function
- problem loading stylesheets to wp_head dynamically
- WordPress redirect redirecting too many times or not at all
- Adding code before post title with the_title produces weird results
- Add back in child theme what the parent theme removed with remove_action
- Redirect website domain (including all pages) to external URL after Popup message (few seconds)
- Solved: redirect to another page using functions.php
- How to properly refresh page after form action?
- Init action and refresh page after form action
- Redirect to other page if login
- Logout Redirect and also WP-login.php Redirect
- How to add array [closed]
- Insert Content Before div#main from the functions.php File
- Problem in using Customizer
- New checkbox in custom widget isn’t saving data
- How do I find the code executed when wp_head() is called?
- How to use wp_enqueue_script properly?
- How to redirect Subscribers on login to specific page, when logging in from a Page
- Redirect to one of two pages after data submitted, depending on the current url
- How to Override Page Template if URL matches query?
- Save_post – Warning: Cannot modify header information
- How do I trigger WP CLI DB export using a PHP function?
- If has action not working as expected
- Modifying a WordPress Plugin
- Is_Page doesnt detect my page
- How do you insert code into the sidebar?
- How to show only specific category post by user role without plugin and restrict all other cats
- Competing Login Redirects – Need to be Combined?
- Remove action hook from Class, understanding OOP
- Restrict access if logged out except for homepage
- How to change form action of wp-login page with a function
- Redirect specific author posts to another url
- Custom download page
- WordPress hooks to call a function inside a construct
- Fatal error: Call to undefined function add_action() – an untouched problem
- Pass arguments to function class with do_action()
- How to create a function to redirect a specified page to another page
- Language switcher for subdomains
- What add_action reference should I be using or should I use do_action?
- Getting error while trying to use custom comment function
- Settings in functions.php used by a plugin
- Allow the access over wp-login.php
- How to request login for user but not for bots
- function to return comma separated list of meta values
- Making an under maintenance page (without using plugins)
- delete_term is not working properly with add_action()
- Disable Attachment Page Except for Category
- How to get variable from other function inside class function using add_action for Ajax call