How to get a picture from a category?
-
I need to display an image corresponding to a category on a sheet’s archive page, thereby replacing the default category icon. It was necessary to display images for each relevant category. How can I do this? If I take the code from the code in the widgets, an error occurs.
<?php if ( $display['cat'] ): ?> <li><i class="fa fa-tag" aria-hidden="true"></i><a href="<?php echo esc_url( Link::get_category_page_link( $category ) ); ?>"><?php echo esc_html( $category->name ); ?></a></li> <?php endif; ?>
/wp-content/themes/classilist-child/classified-listing/custom/list-items/archive-list-1.php
What needs to be added to this code so that instead of: <i class=”fa fa-tag” aria-hidden=”true”></i> Is there a category image?
The page I need help with: [log in to see the link]
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.