Your first code block suggests you’re saving your data into a options field named taxonomy_$t_id
, but you’re trying to get an option named taxonomy_123
in your second code, or whatever the actual term ID is. So you probably getting a return with the value false
, which would be the default for get_option()
. Have you debugged this? Are you sure you have the meta data saved like you want it to be?
// term ID
$t_id = $term->term_id;
// overly long variable name for the option for demonstration purposes
$term_meta_data_options_name="taxonomy_" . $t_id;
// get option with the defined term meta data options name
$term_meta = get_option( $term_meta_data_options_name );
// add/update option with the defined term meta data options name
update_option( $term_meta_data_options_name );