Taxonomy image in WIDGET
-
$cats = get_categories(); foreach ( $cats as $c ) { $url = get_category_link( $c->term_id ); $img = $taxonomy_images_plugin->get_image_html( 'detail', $c->term_taxonomy_id ); if( !empty( $img ) ) print '<a href="' . $url . '">' . $img . '</a>'; }
hi, if a place this code(from plugin page) inside a sidebar or widget, it doesnt works, if there is anybody how have made a plugin or widget help me i’ll preciated your support,… this is the error:
Fatal error: Call to a member function get_image_html() on a non-object in /home/codigo12..../.././..
I tried to place “global $wpdb;”, but it doesn work!..
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Taxonomy image in WIDGET’ is closed to new replies.