Scheduler › Forums › BirchPress Scheduler › Change order of Services?
This topic contains 7 replies, has 5 voices, and was last updated by John King 8 years ago.
-
AuthorPosts
-
July 23, 2014 at 12:45 pm #8197
Hello. My developer set up a site for me and in it all the Services look roughly like:
Tour 1 Person
Tour 2 People
Tour 3 People
Tour 4 People
Tour GroupWhen I created a new Tour page I ended up with:
Tour Group
Tour 1 Person
Tour 2 People
Tour 3 People
Tour 4 PeopleI would like to keep it the way it is across the rest of the site but nothing I or my developer do changes the order. We both fiddled with the date of creation and then deleted the options completely and reentered them in the order the others went in. Same result.
How can I reorder?
Thanks.
July 23, 2014 at 9:06 pm #8203I had the same problem yesterday but managed to figure out a solution in the pro business solution.
Add the following to custom code php for the appointment scheduler.
add_filter(‘birchschedule_model_get_services_listing_order’, ‘birchschedule_cc_model_get_services_listing_order’, 20);
function birchschedule_cc_model_get_services_listing_order() {
return array(10503,10502,10501,10500,10499,10498,10497,10496);
}The array of numbers are the service ID’s which you can find either in wordpress or by have a look at the generated HTML.
Hope it works for you.
May 19, 2016 at 11:00 am #22052I tried entering the PHP code above and it doesn’t seem to reorder my services? If I am understanding correctly the “Service ID” are the post numbers from WordPress?
You can view my form at the website below. We want the order to be individual, couple, family.
May 19, 2016 at 11:01 am #22053May 19, 2016 at 11:03 am #22055Sorry, I pasted the link wrong twice. My apologies.
May 19, 2016 at 11:32 am #22057April 28, 2017 at 12:37 pm #28646Hello Dear John King,
Thank you so much for your precious advices.
Please could you explain me more in details where do I have to paste the folowing code:
add_filter(‘birchschedule_model_get_services_listing_order’, ‘birchschedule_cc_model_get_services_listing_order’, 20);
function birchschedule_cc_model_get_services_listing_order() {
return array(1478,1486,1484,1487,1488,1482,1483,1479,1480,1485,1509,1510,1505);
}—–
You can see in the code the ID’s of my services in the order I would like them to be.I am trying to paste the code directly in the page content of the bookings, like that:
[bpscheduler_booking_form
add_filter(‘birchschedule_model_get_services_listing_order’, ‘birchschedule_cc_model_get_services_listing_order’, 20);
function birchschedule_cc_model_get_services_listing_order() {
return array(1478,1486,1484,1487,1488,1482,1483,1479,1480,1485,1509,1510,1505);
}]But as you can guess, it doesnt work.
To summarize my question is where to paste the code? You are explaining about “custom code php” but I don’t know where or what it is? Sorry for my very starter level in Websites buiding.
Thank you in advandce for your so kind help,
Kind Regards,
Mila from Switzerland
May 3, 2017 at 3:06 pm #28743Go to appointments -> settings -> custom code
and paste it into the php section.John
-
AuthorPosts
The forum ‘BirchPress Scheduler’ is closed to new topics and replies.