Viewing 1 replies (of 1 total)
  • I also need this one, so after checking the plugin file, I just use this code to get the image url:

    if (is_category())
            $term_id = get_query_var('cat');
        elseif (is_tax()) {
            $current_term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
            $term_id = $current_term->term_id;
        } elseif (is_single()) {
            $term_id = wp_get_post_terms( $post->ID, ##your specific taxonomy##, array("fields" => "ids") )[0];
     }
    
     $taxonomy_image_url = get_option('taxonomy_featured_image_'.$term_id);
    echo $taxonomy_image_url;

    Maybe this can help..

    PS: I only use this code for taxonomy archive template and single template. Never tried in other template files

Viewing 1 replies (of 1 total)
  • The topic ‘Get the image URL’ is closed to new replies.