Query Loop Include Posts Order

function custom_generateblocks_query_loop_args( $query_args, $attributes ) { // Check if the query is for the specific block where you want to apply the custom order if ( ! empty( $attributes[‘query’] ) && isset( $attributes[‘query’][‘postIds’] ) ) { // Ensure the post…Continue reading

OM-revenue-attribution-curl.sh

curl –request POST \ –url https://app.optinmonster.com/v2/revenue \ –header ‘Content-Type: application/json’ \ –header ‘Origin: optinmonster.com’ \ –header ‘X-OptinMonster-ApiKey: **************************************’ \ –data ‘{ “type”: “sale”, “value”: “348.00”, “currency”: “USD”, “test”: false, “device”: “mobile”, “transaction_id”: “372626473”, “campaigns”: { “ep4eiifn08pqw838zebq”: “click” } }’Continue reading

Sort dropdown choices alphabetically

function wpf_dev_modern_dropdown_search_results( $config, $forms ) { $config[‘shouldSort’] = true; $config[‘shouldSortItems’] = false; $config[‘sortBy’] = ‘label’; // Sort by label to achieve alphabetical sorting return $config; } add_filter( ‘wpforms_field_select_choicesjs_config’, ‘wpf_dev_modern_dropdown_search_results’, 10, 2 );Continue reading

Add the Page Slug to Body Class (copy)

function wpcode_snippet_add_slug_body_class( $classes ) { global $post; if ( isset( $post ) ) { $classes[] = $post->post_type . ‘-‘ . $post->post_name; } return $classes; } add_filter( ‘body_class’, ‘wpcode_snippet_add_slug_body_class’ );Continue reading