For your author content display, instead of print_r($all_term_meta);
try a foreach
:
foreach($all_term_meta as $meta) {
return $meta[0];
}
It’s possible you may need to use “echo” instead of “return” but try “return” first.
To control whether or not there is an author tab, update your woo_new_product_tab
function with the same condition:
function woo_new_product_tab( $tabs ) {
$terms = get_the_terms(get_the_ID(), 'book-author' );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
// Adds the new tab
$tabs['author_tab'] = array(
'title' => __( 'About the author', 'woocommerce' ),
'priority' => 50,
'callback' => 'woo_new_product_tab_content'
);
}
return $tabs;
}
Related Posts:
- Get value in custom field with taxonomy [closed]
- WP_insert_term how to insert multiple values as taxonomny term?
- Automatically assign taxonomy term if custom meta value exists
- Get child product categories from parent product category in WooCommerce
- Print terms with taxonomy and metabox value
- Get custom category image from menu
- Can I use a Custom Meta Value inside of ‘get_the_terms’?
- How to add contents of a custom field to a taxonomy term list?
- Getting WooCommerce product related child categories
- Query posts using custom taxonomy and selected terms
- How to support fifteen thousand terms in WordPress?
- How to use custom slug and custom templates for custom taxonomy?
- Infinite Scroll appending Next Product Category Term pages
- Cloning product not copying custom taxonomies
- Count tags for current post and save into custom meta field (and update it on post edit)
- Create new Taxonomy, add extra fields, register terms AND extra fields values?
- How to filter a taxonomy meta field to the ‘single_term_title’ filter hook
- Custom order of taxonomy using wp_get_object_terms and woocommerce_term_meta
- Tax query array terms display out of order
- Order posts with custom taxonomy array
- Create heirachy of post terms from array & assign post to terms
- Display woocommerce product_cat child terms with thumbnails
- How do I check if a post has a term with a particular ancestor/parent?
- Hide empty categories on widget
- Change order of Custom Taxonomy List
- Is ACF being a honey trap? [closed]
- Custom order of terms for custom taxonomy in admin and website
- Front End Post Save Child terms
- Taxonomy slug by term ID
- wp_get_object_terms – How can I order the resulting array by hierarchy?
- Custom Taxonomy terms with latest post ordered by date pagination issue
- Echo taxonomy term meta on author.php
- Hierarchical display of custom taxonomy
- Advanced custom fields – taxonomy terms images [closed]
- List only first-level children of specific custom taxonomy term
- get_terms of post->id
- get / list categories and counts filtered by custom taxonomy term
- How to get a list of taxonomy terms which are being used only within certain post types?
- WPML Translating a term/taxonomy programmatically
- how to search in custom fields & custom taxonomy for custom search
- Getting yoast title for custom taxonomy
- Get terms from posts submitted within a certain time
- Display Terms for all posts in Current Archive or Query
- Solve product properties with custom taxonomies?
- Get direct children of custom taxonomy
- get_terms: determine if taxonomy term has children
- Is it acceptable to build functionality into a theme built for a client? [closed]
- Display post taxonomies tree
- List subcategory on taxonomy term page
- Operations with custom fields values in a loop
- get_term_children returns WP_Error for custom taxonomy
- Displaying terms by first letter
- Filter WooCommerce admin products list by a custom taxonomy
- Same taxonomy for different object types
- I am trying to display information from a custom table from my wordpress users pages
- Save custom taxonomy data in different table not in wp_options for my own plugin
- Can’t set custom taxonomy terms via custom form
- get_terms not returning any custom taxonomies
- How do I return all terms from multiple taxonomies?
- WordPress implode & wp_insert_post question
- What does ‘category__in’ mean in queries?
- WP REST API – get custom taxonomies based on terms & filter
- Get all terms, including unchecked, or get the terms outside loop
- get_term_link not working
- How to write sql query to get the posts from a custom taxonomy term name
- Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term
- How to group all terms children’s in custom taxonomy?
- Display Posts by Custom Taxonomy Chosen Terms
- How to display a custom taxonomy without a link?
- Build filter for post-type + multi taxonomies + multi terms
- How do I get term data associated with the current post, where the result is not wrapped in HTML?
- Hide terms if they aren’t the same as the current term
- How to show post list based on taxonomy term?
- Can you hide empty terms using get_term_children?
- get_term_by works but get_terms doesn’t?
- Display empty custom taxonomies differently than with one with posts
- Double slash in the_terms URL
- How to call a custom taxonomy term name inside a function?
- How to list Custom Taxonomy
- List terms of custom taxonomy if matches other taxonomy
- How to output taxonomy term (incl. link to archive) on author.php?
- Display Child Categories of Current Post ID
- Set two terms for a post when they differ only by an accent
- How can I show links for custom posts group by taxonomy current term and sub-term?
- Add taxonomy column with meta field (ACF) content
- Warning: Undefined variable $post in C:\xampp\htdocs\… after PHP upgrade
- Query Product categories what have a custom field
- Listing Cities A custom taxonmy by selection order
- Add A CSS Class To A Menu Item When A Custom Taxonomy Term is Present On Single Post
- how to show product custom taxonomies in woocommerce rest api
- Output slugs to use as class names for every taxonomy a post is attached to
- How to save array option as text and not integer?
- set_object_terms for custom taxonomy in custom post type – not working
- Orderby taxonomy term id using get_posts not working
- Permalink Rewrite to include Custom Taxonomy Term
- How can I show custom field according to taxonomy?
- Taxonomy Extra Meta [duplicate]
- Advanced WordPress search form based on custom taxonomy and custom meta value
- How can I get parent term from a child term
- get_terms() – unexpected ‘=>’ (T_DOUBLE_ARROW) error