• Resolved gambit37

    (@gambit37)


    Awesome plugin! I spotted a problem though: selecting an option to choose Page/Pages/Post/Posts/Custom Posts only displays five items.

    I’ve edited your get_posts query and added ‘numberposts’ => -1 to fix this, but is this right? Is there another place to change this limit? Did I miss something obvious?

    Thanks.

    http://wordpress.org/extend/plugins/option-tree/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Derek Herman

    (@valendesigns)

    What line of code did you edit?

    Thread Starter gambit37

    (@gambit37)

    In functions/post.php, I changed lines 24 and 85 to:
    $posts = &get_posts(array('numberposts' => -1, 'orderby' => 'date' ));

    In functions/custom-post.php, I changed line 24 to:
    $posts = &get_posts( array( 'post_type' => trim($value->item_options), 'numberposts' => -1, 'orderby' => 'title', 'order' => 'ASC' ) );

    You’d also want to change line 85 in custom-post.php, but I didn’t need to for my purposes. I also added ordering parameters.

    I think category.php might need some love too — to enable ordering /sorting.

    Perhaps you could also add sorting/ordering options for these types in the Option Tree settings?

    Is the limit to 5 items a bug, or did I miss an option somewhere?

    Thread Starter gambit37

    (@gambit37)

    I’m wondering if there’s any news on this issue? Is there an official update coming that fixes the 5 limit for post selection?. Many thanks.

    Plugin Author Derek Herman

    (@valendesigns)

    It’s fixed and will be included in the update later today.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: OptionTree] Post / Posts / Custom Post should not be limited’ is closed to new replies.