• Resolved aceofjames

    (@aceofjames)


    I would like to sort the fields on the meetings page.

    For example we want the REGION to be the first field displayed then TIME. Right now the TIME is the first field displayed. How can we change the order of the fields displayed?

    Thank you in advance!

Viewing 14 replies - 1 through 14 (of 14 total)
  • Ok you got it. Update to 2.12.5 and add this to your functions.php:

    $tsml_sort_order = ‘region’;

    Without the curly quotes though, sorry:

    $tsml_sort_order = 'region';

    Thread Starter aceofjames

    (@aceofjames)

    Excellent!
    Thanks for the fast reply! I’ll do that first thing in the morning. Can you fully dictate the order with fields separated by commas in the order you want?

    For example: region,other fiekd,some other field

    Thanks! AceOfJames

    No, just the one field for now. If you know a developer who wants to add that, it is open source software and contributions are welcome.

    Thread Starter aceofjames

    (@aceofjames)

    I added that code and upgraded and Region is still last when shown on the meetings page. We want Region to be the first fields displayed in the list.

    I do not think it worked unless there is something more I must do besides add that line of code to the functions.php

    Please advice!

    Thank you in advance!

    Ah, ok, I thought you wanted to sort the data by the region field first, rather than change the order of the columns.

    That that line out of your functions.php then, because it’s doing the wrong thing.

    I’ll make a way for you to change the order of the columns and let you know when it’s ready.

    Thread Starter aceofjames

    (@aceofjames)

    Excellent! Thanks and let me know when you have devised a snippet of code to use.

    I appreciate the help!

    AceOfJames

    Ok try this:

    $tsml_columns = array('Region', 'Time', 'Distance', 'Name', 'Location', 'Address', 'Types');

    You can set the order of the other columns as well. Some are not visible by default but you still should keep them.

    You should update to the latest version (2.12.9) for this to work.

    Thread Starter aceofjames

    (@aceofjames)

    I updated to 2.12.9 and added the code to the functions.php file and TIME is still first.

    Where did I go wrong? πŸ™‚

    Thread Starter aceofjames

    (@aceofjames)

    That was pretty vague of me but it didn’t work. Does that code make “Region” the first field, then time, distance etc. ?

    It does. It’s working on my demo site, not sure why it wouldn’t be working on yours. What’s your URL? If you want, send your FTP info info@meetingguide.org and I will take a look, otherwise not sure what to suggest.

    You might want to triple check that you’re editing the functions.php of the active theme by adding a die('hello'); statement to it to see if it has an effect.

    Thread Starter aceofjames

    (@aceofjames)

    I just emailed you. Thanks!

    Thread Starter aceofjames

    (@aceofjames)

    Thanks for all the FAST help!

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

The topic ‘Sorting Fields’ is closed to new replies.