Taxonomy Featured Image not working
-
Featured image in taxonomy add/edit was not showing. After investigation, it was because the function get_taxonomies (class-archive-control.php:325) is called within the init hook.
Adjusting the priority fixed this problem :
class-archive-control.php:77 --- add_action( 'init', array( $this, 'archive_control_handle_taxonomy_fields' ) ); +++ add_action( 'init', array( $this, 'archive_control_handle_taxonomy_fields' ), 999 );
Then another problem, taxonomies images was not showing on the front-end category page, but only the archive image.
Fixed with :
class-archive-control.php:77 --- if (is_post_type_archive()) { --- $post_type_slug = get_query_var('post_type', null); --- } --- if (is_tax() || is_category() || is_tag()) { --- $term = get_queried_object(); --- $term_id = $term->term_id; --- } +++ if (is_tax() || is_category() || is_tag()) { +++ $term = get_queried_object(); +++ $term_id = $term->term_id; +++ } else if (is_post_type_archive()) { +++ $post_type_slug = get_query_var('post_type', null); +++ }
Topic made to help others and the creator of this plugin.
Thanks for this useful plugin, I hope you will merge this patch in your next release.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Taxonomy Featured Image not working’ is closed to new replies.