Change order

Support MB Group Change order

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #563
    IchFloqueIchFloque
    Participant

    Hi! The plugin works great!
    But is there a way to change the order of the Boxes in the backend (also for groups)?
    When I want to add a new box at the beginning, I would need to shift all data in the fields below.
    Is there an easier way to do this??
    Thank you

    #567
    Anh TranAnh Tran
    Keymaster

    Hi, as we're using code to register meta boxes and fields, the only way with coding to change fields' order is changing code. There's no easier way to do that :(.

    Best regards.

    #568
    IchFloqueIchFloque
    Participant

    i understand. how can you change the code so the the newest field entries are being returned first by the frontend?

    #569
    Anh TranAnh Tran
    Keymaster

    All you need to do is moving the array of the latest field to the first place in the fields array, something like in this screenshot:

    #571
    IchFloqueIchFloque
    Participant

    i actually meant returning the new record first. so a new data record is entered, which is only possible to be entered at the bottom in the backend, but should be the first in the frontend. like being sorted by date, newest entries first. 🙂

    #572
    Anh TranAnh Tran
    Keymaster

    Are you using get_post_custom to get post meta? Because from what you said, it looks like you display fields in the backend in one order and display fields in the frontend in another order, and as we don't have a function to list all fields in the frontend, the only way to do that I guess is get_post_custom function.

    If so, I'm afraid there's no way to achieve that. The order you register fields = the order fields are displayed in the backend = the order WP processes data and stores in the DB = the order you get with get_post_custom.

    Or maybe you should do something like array_reverse as a trick before displaying fields in the frontend?

    #573
    IchFloqueIchFloque
    Participant

    yes, thank you! good idea! array_reverse does what i wanted!
    for future updates please consider a way to sort data records in the backend, would be very helpful!
    thank you again!

    #575
    Anh TranAnh Tran
    Keymaster

    Cool, glad it helps 🙂

    I'd think about order to records fields. Thanks for your idea!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Change order’ is closed to new replies.