i added a facebook login button to my website, this facebook button work well but even if a user is logged in, the facebook login still shows i need detail help or tutorial link that can help me change the text after login.

  • 1
    You need to ask the developers of the button. Has little to do with WordPress itself. – Jacob Peattie Feb 5 '18 at 9:39
  • okay, thanks for your response i will contact them right now – sambayour Feb 5 '18 at 9:40

You can use WordPress function is_user_logged_in() to check if user if logged-in or not

if ( !is_user_logged_in() ) {
    // print your facebook login button with login title text.
} else {
    // print your facebook login button with custom text.
| improve this answer | |
  • wordpress doesn't seem to execute php code directly, is there any php plugin that you can suggest to execute the code you shared above? – sambayour Feb 5 '18 at 9:36
  • WordPress already in PHP language. you dont need any kind of php plugin. try to wrap the above code in <?php //here ?> PHP tags – 1naveengiri Feb 5 '18 at 9:41
  • i tried the code with the php tag as suggested, the page output the same source code – sambayour Feb 5 '18 at 13:46
  • [ link ] (snag.gy/GStUMX.jpg) – sambayour Feb 5 '18 at 14:01
  • You doing it in wrong way. give detail of your code file in question and description so that I can suggest you. – 1naveengiri Feb 5 '18 at 16:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.