0

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.

closed as off-topic by Nathan Johnson, EAMann Feb 15 '18 at 23:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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
1

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.
}
  • 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.