Custom Functions

[ad_1]

I’m trying to add a custom function that will give my users a redirect that they can change the destination of. I also need to assign to their account a custom URL for their redirect. I was wondering if I could use Advanced Custom Fields for this and would it require any custom coding?

[ad_2]
2 Comments
  1. >*I was wondering if I could use Advanced Custom Fields for this and would it require any custom coding?*

    Yes and yes

  2. Interesting. What’s the use case? As u/bluesix says, yes and yes are the answers here. It’s not difficult to set up a redirect based on a custom field, but it does require a little work to make it go.

    You’ll want to get the user, get the field and use the wp_redirect hook to redirect based on your if statement provided you don’t want to always redirect the user, i.e. do you only want to redirect once logged in? Do you want to redirect for specific pages? Etc.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer