WordPress.org

Ready to get started?Download WordPress

Forums

Buddypress Xprofile Custom Fields Type
[resolved] Custom Post Type Multiselector (7 posts)

  1. dabesa
    Member
    Plugin Contributor

    Posted 1 year ago #

    Hi folks,
    This plugin is great and the Custom Post Type Multiselector is a really great option!

    But, when I create a field and I choose my custom post type, in the edit profile page I see only a list of 10 custom post entries.
    How can I change to display all the entries I have?

    http://wordpress.org/extend/plugins/buddypress-xprofile-custom-fields-type/

  2. dabesa
    Member
    Plugin Contributor

    Posted 1 year ago #

    Looks like this code returns only 10 posts:

    // Get the posts of custom post type.
    $loop = new WP_Query(array('post_type' => $custom_post_type));

    Thanks

  3. dabesa
    Member
    Plugin Contributor

    Posted 1 year ago #

    Let me answer myself :)
    WP_Query returns a posts_per_page items.

    So I changed with this:

    $loop = new WP_Query(array('posts_per_page' => -1, 'post_type' => $custom_post_type, 'order_by' => 'title', 'order' => ASC ));

  4. donmik
    Member
    Plugin Author

    Posted 1 year ago #

    Yeah, I think you're right. I've added this to version 1.4.9.1.

    Thanks!

  5. dabesa
    Member
    Plugin Contributor

    Posted 1 year ago #

    Hi Atallos,

    I installed Version 1.4.9.1 but it's still the same as before, how come?

    Thanks
    http://www.itvc.net

  6. dabesa
    Member
    Plugin Contributor

    Posted 1 year ago #

    OK I see, you changed only the instance in:

    case 'select_custom_post_type':

    but actually also the others recurrence has to be updated.

  7. donmik
    Member
    Plugin Author

    Posted 1 year ago #

    You're absolutely right, I don't know what I was thinking.

    It's solved now in version 1.4.9.2.

    Sorry!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.