# Check if user has connected Patreon account to WordPress

**URL:** <https://www.patreondevelopers.com/t/check-if-user-has-connected-patreon-account-to-wordpress/6989>\
**Category:** Wordpress Plugin\
**Created:** [February 4, 2023, 3:32pm UTC](https://www.patreondevelopers.com/t/check-if-user-has-connected-patreon-account-to-wordpress/6989 "2023-02-04T15:32:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![katiedev](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/katiedev/32/1666_2.png) [@katiedev](https://www.patreondevelopers.com/u/katiedev)\
**Post date:** [February 4, 2023, 3:32pm UTC](https://www.patreondevelopers.com/t/check-if-user-has-connected-patreon-account-to-wordpress/6989/1 "2023-02-04T15:32:38Z")

</div>

I want to include a conditional statement in my WordPress theme that checks if user has or has not connected their existing WordPress account to Patreon.

# what I want to do

1. If they are not connected to Patreon show the Patreon button (using the shortcode `[patreon_login_button]`).
2. If they are connected with a $0 pledge show a link to the Patreon website
3. If they are connected and have a Patreon membership greater than $1 show a link to their Patreon memberships (on Patreon website).

How do I check for the instance of a $0 value pledge. I’ve tried to check for `$user_patronage == 0`, however this causes the output to display even before user has connected their account.

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [February 6, 2023, 4:56pm UTC](https://www.patreondevelopers.com/t/check-if-user-has-connected-patreon-account-to-wordpress/6989/2 "2023-02-06T16:56:28Z")

</div>

Try checking if a patron connected his or her Patreon over the meta in your other thread. Then if so, check whether pledge is 0 or lower than what you want. Those conditions would allow you to decide between showing a Connect button or an Unlock with Patreon button.
