Paid membership Pro Rest API

First you will need to have the plugin installed (paidmembershipspro ) otherwise you wont be able to call the function “pmpro_getMembershipLevelForUser” and then you just need to copy the code below to your functions.php file which is inside your WordPress theme. /* Call to http://yoursite.com/[email protected]&secret=CHECK to check the membership level of a user. */ function … Read more

How Can I keep password protected posts in the json requests but not on frontend queries?

I sort of solved this by using this: function ar6_password_post_filter( $where=”” ) { if (!is_single() && !current_user_can(‘edit_private_posts’) && !is_admin()) { $where .= ” AND post_password = ””; } return $where; } add_filter( ‘posts_where’, ‘ar6_password_post_filter’ ); This allows user roles of administrator and editor to still see the password protected posts on the front end of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)