Home › Forums › General Issues › Filtering issues which remove images and filters on page › Reply To: Filtering issues which remove images and filters on page
Hi Jarvis,
Hope you’re well?
Unfortunately since implementing this, I’ve found adding a redirect to the Homepage for users when they login breaks the films filters and actually inputs part of the page they’re redirected to in place of the filtered data.
I don’t know enough about Ajax at this stage to work out what the problem is exactly but it’s like the page is working like an iframe and trying to place the Homepage content into the “filtered-films” element.
// Redirect subscriber accounts to homepage
add_action('admin_init', 'redirectSubscribersToHomepage');
function redirectSubscribersToHomepage()
{
$currentUser = wp_get_current_user();
if (count($currentUser->roles) == 1 AND $currentUser->roles[0] == 'subscriber') {
wp_redirect(site_url('/'));
exit;
}
}
https://pasteboard.co/GoO2kKmKWfoo.png
Any thoughts please?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U
— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.