I want to use a Toolset Form to edit the Menu Order value of posts, but I can't see a way to do this through the standard Toolset Form functionalities.
Solution:
Add a generic input to the form with the slug name the-order. Then, add custom code to the Toolset custom code section to update the Menu Order using cred_save_data action.
Sample code to get started:
add_action('cred_save_data', 'update_post_order', 10, 2);
function update_post_order($post_id, $form_data) {
// Check if the correct form is being submitted
if ($form_data['id'] == [YOUR_FORM_ID]) { // Replace [YOUR_FORM_ID] with the actual ID of your form
if (isset($_POST['the-order'])) {
$new_order = intval($_POST['the-order']); // Ensure the input is treated as an integer
// Update the post order
$args = array(
'ID' => $post_id,
'menu_order' => $new_order
);
wp_update_post($args);
}
}
}
Toolset map shows the markers for the items that are currently showing on the search page.
If you use pagination and there are some entries that goes to the second page, will not show on the map and you need to click the pagination controls to load them to show on the map.
Problem:
The customer was facing an issue where the Full Calendar JavaScript, embedded within a view on their site, stopped displaying events. Despite trying updates and checks, the calendar remained empty. Solution:
We initially checked for errors and confirmed the calendar's functionality. When further issues were detailed by the customer, we requested temporary admin and FTP access to diagnose the problem. After modifying the calendar-object view and observing a purge of internal cache, the events appeared again. To ensure updates were reflected immediately and to tackle ongoing caching issues, we advised the customer to disable caching for the specific view using the 'cached="off"' parameter in the Toolset view setup.