List of posts by day of the week

What about using just get_posts (removing the order_by argument), then looping through to create and array of programs, then building the output from that: $posts = get_posts(array(‘post_type’=>’programas’,’meta_key’=>’audio_date’)); $programs = array(); foreach ($posts as $post) { $days = get_post_meta( $post->ID, ‘audio_date’, true ); // $time = get_post_meta( $post->ID, ‘audio_time’, true); $found = false; foreach ($days as … Read more

How to insert a local image with custom size

add_image_size function has nothing to do with the images that are located in theme root directory. When you add add_image_size function , we are saying that : Hey WordPress! Can you please also re-size my uploaded images via WordPress admin to this particular size also hard crop the image if image size is bigger ( … Read more

How to generate HMAC-SHA1 signature to use with WP REST API and OAuth1

I have same problem but for auto generate time and nonce you can do this: <?php $nonce = md5(mt_rand()); // Set headers curl_setopt($ch, CURLOPT_HTTPHEADER, [‘ Authorization: OAuth oauth_consumer_key=”zfksKSt8m7Bk”, oauth_nonce=”.$nonce.”, oauth_signature=”%2BOy0fDsKilNymYOOZRqjJN5q3tg%3D”, oauth_signature_method=”HMAC-SHA1″, oauth_timestamp=’.time().’, oauth_token=”IG6x6jIjboVhmyzFtjzn1fGT”, oauth_version=”1.0″ ‘, ‘Content-Type: application/json; charset=utf-8′, ] ); I’m study for generate signature. I think It Can Be Useful To generate the signature … Read more