Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter CristianOspina

    (@cristianospina)

    Mmm never mind, I solved:

    add_action('save_post', 'save_other_video_thumbnail', 100, 1);
    function save_other_video_thumbnail($post_id) {
    $postdata = get_postdata($post_id);
    	if ($postdata['post_status'] == 'future') {
    		get_video_thumbnail($post_id);
    	}
    }
    Thread Starter CristianOspina

    (@cristianospina)

    This is a part of the SQL:
    AND (wp_postmeta.meta_key = 'personas' OR (mt1.meta_key = 'idioma' AND CAST(mt1.meta_value AS CHAR) = '') OR (mt2.meta_key = 'idioma_2' AND CAST(mt2.meta_value AS CHAR) = '') )
    apparently what happens is that the order meta_key is added to meta_query then the order does not affected, being ordained by default:
    GROUP BY wp_posts.ID ORDER BY wp_posts.post_date desc LIMIT 0, 15

    Then, there is another way to sort by meta_key without combining with meta_query?

    This is the same problem on StackOverflow. But I can not get my code works… Help please!

Viewing 2 replies - 1 through 2 (of 2 total)