Created
January 10, 2013 19:01
-
-
Save whyisjake/4504796 to your computer and use it in GitHub Desktop.
When you add an orderby with the meta_key set to the page number, if no value is set, the results are omitted, is there any way around that?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => 'magazine', | |
'title' => 'Articles', | |
'post_parent' => $post->ID, | |
'order' => 'asc', | |
'meta_key' => 'PageNumber', | |
'orderby' => 'meta_value_num' | |
); | |
make_magazine_toc($args); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment