How to output CMB2 select options from repeated groups select elements?
How to output CMB2 select options from repeated groups select elements?
How to output CMB2 select options from repeated groups select elements?
If that testing_db is your WordPress database, then you should use the WordPress wpdb API/class to interact with the data in your custom table (wp_tmadm_dojangs). So if this is how you do it in “regular PHP”, i.e. using native PHP functions: $sql = mysqli_query($conn, “SELECT dojangName FROM wp_tmadm_dojangs”); while ($row = $sql->fetch_assoc()){ $dojang = $row[‘dojangName’]; … Read more
Gutenberg get core data – search
This may not definitively answer the question, but I hope this helps you in finding the most appropriate solution. And actually, I’ve tried the super simple plugin at the bottom with your HTML and JS, and everything worked fine for me. This is my first attempt to write a plugin and I get an error … Read more
You might try: SELECT NULL AS rank, player, points FROM my_table Then write a tiny loop to fill in the value for rank in each returned record?!?!? It’s a workaround rather than a solution but in the end, you’ll have what you need.
Are you familiar with jQuery? You’ll want to post the term to a admin-ajax, and use the response to populate the second select. Here is the codex documentation: http://codex.wordpress.org/AJAX_in_Plugins A loose example for your situation: $first_term = $(‘#states’); $name = $first_term.children(‘option:selected’).text(); var data = { action: ‘tag_slug’, slug: $slug }; var ajaxurl=”wp-admin/admin-ajax.php”; $.post(ajaxurl, data, function(response) … Read more
Here is what I discovered and use, maybe it will help you: function custom_posttype_dropdown($name, $selected) { $out = “”; $posts = get_posts( array( ‘post_type’ => ‘bctap_templates’, ‘numberposts’ => -1 ) ); if($posts ) { $out=”<select name=””.$name.'” ><option>Select a Template</option>’; foreach( $posts as $p ) { if ($p==$selected) { $selected = “selected = ‘selected'”; } else … Read more
Ok, I’ve solved the issue myself. Turns out I had the name=”_department” attribute duplicated in another field that was conflicting with my select field. My select saves just fine now I’ve edited that.
Seeing as my comments seemed to answer the question: To get access to the URL params you want $wp_query->query_vars[‘myvar’]: http://wordpress.org/support/topic/how-to-pass-value-in-wordpress-url, e.g.: <?php global $wp_query; $node_id = 0; $args = array( ‘post_type’ => ‘jobs’, ‘category_name’ => $wp_query->query_vars[‘position_name’] ); $the_query = new WP_Query( $args ); The other parts of the question aren’t really WordPress issues, so Stack … Read more
This doesn’t really seem to be a WP question, but: as far as PHP goes, the function you’re looking for is checkdate(). That said, you really should also do something client-side (that is, JS) for the user.