group posts by taxonomy terms
group posts by taxonomy terms
group posts by taxonomy terms
Catchable fatal error: Object of class stdClass could not be converted to string in /wp-content/themes/new/single.php on line 22 This is because $wpdb->get_row returns an object by default and you can’t echo an object. Changing echo $toc to echo $toc->meta_value will give you your desired result. Your other problem is that multiple terms can have have … Read more
You are looking for get_object_taxonomies ex: $taxonomies = get_object_taxonomies(‘thing’) ; print_r($taxonomies) // Show “color,shape,material”..
Your problem is in using as orderby value meta_value and thus the order is correct – from computer point of view. To get currect order from human point of view, try to use meta_value_num instead. You can read more in here: https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
Ordering taxonomies by rank
I eventually muscled my way through it. The first thing I did was manually activated the plugin via the database. Next I went back to the subsite to verify that the plugin was activated. It was not. So I tried activating again. Now I was getting an error in relation to memory being exhausted. This … Read more
Have you tried wp_set_object_terms? …which needs to be placed after your call to wp_insert_post as it requires the post ID in order to attach the correct terms, to the right taxonomy with the right post. //add_action(‘plugins_loaded’, ‘newpost’); # will not work, user not authenticated add_action(‘init’, ‘newpost’); // will work, user authenticated function newpost() { if … Read more
Sitemap generation
Custom Taxonomies and parents
I ended up adding an additional taxonomy meta class I was then able to use the following to get my phone number: <?php //Get the correct taxonomy ID by slug $term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) ); //Get Taxonomy Meta $saved_data = get_tax_meta($term->term_id,’loc_phone’); ?> <?php if( $saved_data != “” ) { … Read more