Title: Widget
Last modified: February 8, 2022

---

# Widget

 *  Resolved [vasian4515](https://wordpress.org/support/users/vasian4515/)
 * (@vasian4515)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/widget-189/)
 * Hi Greg, is it posible in widget to show category instead of location? Screenshot
   [https://ibb.co/Wc2sVbY](https://ibb.co/Wc2sVbY)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/widget-189/#post-15340454)
 * Hi,
    it is but right now the only way to do that would be to open the wpadverts/
   includes/class-widget-ads.php on lines about 524 to 530 replace the location 
   code with the category/taxonomy code.
 * The major downside to doing this is of course that all the changes you will make
   will be overwritten on the WPAdverts update.
 *  Thread Starter [vasian4515](https://wordpress.org/support/users/vasian4515/)
 * (@vasian4515)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/widget-189/#post-15340943)
 * Hi, i found this lines
 *     ```
       <?php if( $location ): ?>
                               <div class="adverts-widget-recent-location">
                                   <span class=" adverts-icon-location">
                                   <?php echo ( $location ) ?>
                                   </span>
                               </div>
                               <?php endif; ?>
       ```
   
 * I just have to change location word to category word?
 *  Thread Starter [vasian4515](https://wordpress.org/support/users/vasian4515/)
 * (@vasian4515)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/widget-189/#post-15341375)
 * One more question please, is it any way to customize ad photo size on widget 
   frontend, make it bigger? [https://ibb.co/D4tHDqB](https://ibb.co/D4tHDqB) What
   parameters need to be changed for this?
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/widget-189/#post-15345005)
 * Hi,
    1. you would need to replace the whole code you pasted with code that will
   get category information from the database
 *     ```
       <?php $category = get_the_terms( get_the_ID(), 'advert_category' ) ?>
       <?php if( isset( $category[0] ) ): ?>
       <div class="adverts-widget-recent-location">
         <span class=" adverts-icon-tags">
         <?php echo esc_html( $category[0]->name ) ?>
         </span>
       </div>
       <?php endif; ?>
       ```
   
 * 2. to change the image size in this widget you would need to customize the CSS
   code on lines 508 to 514 – note this will require some HTML/CSS knowledge to 
   do.
 *  Thread Starter [vasian4515](https://wordpress.org/support/users/vasian4515/)
 * (@vasian4515)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/widget-189/#post-15345376)
 * Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Widget’ is closed to new replies.

 * ![](https://ps.w.org/wpadverts/assets/icon-256x256.png?rev=2423472)
 * [WPAdverts - Classifieds Plugin](https://wordpress.org/plugins/wpadverts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpadverts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpadverts/)
 * [Active Topics](https://wordpress.org/support/plugin/wpadverts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpadverts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpadverts/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [vasian4515](https://wordpress.org/support/users/vasian4515/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/widget-189/#post-15345376)
 * Status: resolved