Set up WP Authentication from External API

Update: Made a blog post to explain this better 🙂 I was able to do this by WP’s authenticate filter inside a new plugin; most of which is guided by this tutorial by Ben Lobaugh. Major points on the plugin: Make an API call function using cURL (you can get guide codes from Postman upon … Read more

Consuming an external API to publish/post to wordpress

You can use the HTTP API in combination with the Transient API, and of course you would most likely need to parse what you want. As for what to do with the data you will have to provide a more specific example, there are many actions, functions, and conditional parameters.

term_exists returns NULL

It can return null in some cases if you look at the code: http://core.trac.wordpress.org/browser/tags/3.3.2/wp-includes/taxonomy.php#L1492 The method get_var returns null if no result is found. If you check with “==” and not “===” that should work with false or 0.

hybridauth (google OAuth integration) and WP problems

You could use a plugin I believe? In that case, you can try WordPress Social Login which is based on the HybridAuth Library (which you already seem to be using) and Social Connect plugin. As of now, the plugin supports some 20 services including Facebook, Google, Yahoo, Twitter, Windows Live, Foursquare, Linkedin, and Tumblr, among … Read more

get_pages and get_posts returning different data?

You are passing the array for post_status wrong way, Here I updated your code with correction. To show List of pages //To display list of pages $args = array(‘post_status’ => array(‘drafts’, ‘publish’)); $pages = get_pages($args); foreach ( $pages as $page ) { // some html code that displays the page title } To show List … Read more

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