Set Custom Taxonomy to Entire Site Programatically

I got it to work by registering a custom taxonomy… add_action( ‘init’, ‘create_country_tax’ ); function create_country_tax() { $userInfo = geoip_detect2_get_info_from_current_ip(); $country = $userInfo->country->isoCode; register_taxonomy($country,’country’); } and then calling taxonomy_exists(‘US’).

First custom field value (out of several) displayed twice after query

I managed to fix it! As I suspected it had nothing to do with the code relating to $number, but rather the echo call before it. My initial code looked like this (I’m skipping part of the loop content to keep it simple): echo ‘<p style=”color:grey;font-size:11px;margin:0;”>(‘ . $number = intval(get_post_meta(get_the_ID(), ‘number’, true)); if($number > 1){ … Read more

Failure to add term meta

This turned out to be a database issue. Due to some security measures put in place by the infrastructure team, the network upgrade script was prevented from completing the upgrade on all sites. Thus, for the specific site within our WordPress Network on which this plugin was being tested, the wp_termmeta table had not been … Read more

Problems with taxonomy quick edit box

If you have multiple <a href=”#” class=”editinline”>#</a> your jQuery should use on() to save memory. Add .editinline selector to attach the function (handler) to multiple elements (in this case — <body> children) jQuery(‘body’).on(‘click’, ‘.editinline’, function(){ var now = jQuery(this).closest(‘tr’).find(‘td.column-special_star’).text(); //console.log(now); if (now.charAt(0)==’S’) {now_i = ‘1’;}; if (now.charAt(0)==’N’) {now_i = ‘0’;};look like this //console.log(now_i); jQuery(‘#special_star_val’).val( now_i … Read more