Hello everyone. I am very new to wordpress so please forgive my ignorance. I have a custom 3rd party application running side by side with wordpress. My application is in root of domain and WordPress is in sub domain and own db. My php application has it’s own login function that displays like this
user not logged in: Good Morning, Login | Register
user is logged in: Good Morning, Username – Logout
I would like to display this function inside the header of my wordpress installation and I am running into a wall.
I asked on the 3rd party apps forums and got this response, but i can’t get it to work.
In your index.php or whatever main controller file you have for “WP” you’ll need to add this line:
Now the 3rd parties app backend is loaded into your WP.
Then try to put your $login_include anywhere in your WP theme however it works.. never played with it.
Full code is as follows:
You should see something but you’ll need a programmer to position the $login_include to where you want your login include to be located in your WP.
I have tried to do this in the index.php file within the root directory of where my WP is installed but I don’t get a thing to display.
I am wondering if I am adding the code to the right file or if this is even the best way to proceed.
As stated above all i want is to display this function so that the user can see they are logged in or out of my app.
Any assistance in getting me to the right place is greatly appreciated. Thanks in advanced.
- The topic ‘How to add an external function inside wordpress header’ is closed to new replies.