Help with callback using do_action_ref_array

That feature exists because I bugged them to implement it 🙂 https://support.booking-wp-plugin.com/hc/en-us/community/posts/207263389-Add-a-WordPress-hook-for-custom-validators-on-the-custom-fields?page=1#community_comment_115001021885 Using it confused me as well but somebody finally replied to this just the other day with this snippet: add_action( ‘bookly_validate_custom_field’, function ( \stdClass $field, &$errors, $cart_key, \stdClass $field_info ) { // Validation by custom_field id switch ( $field->id ) { case ‘id_value’: … Read more

How to alter the order of custom form fields

WordPress doesn’t provide the hooks you want but it you are willing to use PHP’s output buffering and preg_replace() you can get it to work without hacking core. Here’s an answer that talks about the general technique required: Removing Unnecessary Text from Admin Menu without CSS The hooks you’ll want to use are ‘category_pre_add_form’ for … Read more

Add Top-Level Menu that opens URL

I’ve experimented with various solutions or workarounds proposed elsewhere on this site – for instance here: Adding an Arbitrary Link to the Admin Menu? and this one here: http://www.techedg.com/2014/09/06/5575/a-simple-way-to-add-an-external-link-to-the-wordpress-admin-menu/ All of the solutions that I tested that worked included that behavior of adding an unwanted blank admin page. I’m not sure that there is not … Read more

How to exclude content (and other returned values) from WP_query()?

Like a commented the only way to do it is with a custom sql query so: global $wpdb; $mypages = $wpdb->get_results( “SELECT post_title, post_name FROM $wpdb->posts WHERE post_type=”page” AND post_status=”publish” AND parent=”0″”); if (count($mypages) > 0){ foreach ($mypages as $page){ //do you stuff //$page[‘post_title’] for title //$page[‘post_name’] for slug } }