Hot answers tagged

3

So I presumed your sub plugin loads after the main one, right? Here i can see that new value is added to array but now i have to define test2 function inside my sub plugin If you're certain test2 successfully added to the array and that test2 was being called from MyClass::autoload_function(), then you can try using an early hook like init to define test2, ...


1

Short Answer I am trying to simply redirect users to a login page if they go to the account page without being logged in. Try with is_page() once again, but use the correct syntax: (see home_url() for more information about the function, but it's an easy way to get your WordPress URL and you can pass any valid path like /login/) add_action( '...


Only top voted, non community-wiki answers of a minimum length are eligible