Plugin is a widget, but I want to call it in the head, can I?

The correct “WordPress” way of doing it would be to use the_widget template tag to display widgets anywhere you want. so in you case you would something like this: $instance[‘account’] = ‘account name’; //Ustream channel name $instance[‘online’] = ‘http://www.online_image.URL’; $instance[‘offline’] = ‘http://www.offline_image.URL’; the_widget(‘wp_ustream_status’, $instance);

How can I call specific function if requested URL is not found?

Simply use template_redirect filter to perform check on request you get in wordpress. add_filter(‘template_redirect’, ‘my_404_override’ ); function my_404_override() { global $wp_query; if (!$wp_query->post) { // Check if any post is found. If not its 404. status_header( 200 ); $wp_query->is_404=false; // Create post object $my_post = array( ‘post_title’ => ‘My post’, ‘post_content’ => ‘This is my … Read more

Integrate product feed API in Woocommerce [closed]

There is a similar problem to create posts from an API and programmatically generating posts. Essentially just parse the JSON into an array, grab the fields you need, and create the post/product. You most likely need to pull the images as well. You should also consider if the post already exists in your database and … Read more

How to get a post’s associated taxonomies and terms in wp api v2

Ok, I just stumbled upon the answer buried deep in the github issues page: https://github.com/WP-API/WP-API/issues/1403 The answer is: the reason is that the terms / meta etc are different objects, and in typical REST design going a GET on a single resource, will give you that resource, not that resource and a bunch of other … Read more

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