Title: Adding description to widget
Last modified: September 18, 2018

---

# Adding description to widget

 *  Resolved [konti](https://wordpress.org/support/users/konti/)
 * (@konti)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/adding-description-to-widget/)
 * Hello, is possible to add description to widget? I need to make a widget which
   will show actually event and two-three next, but with descriptions. By shortcode
   I cant use it as I want, only with widget but there is no option to show description.
   Is any way to add this feature?

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

 *  Plugin Contributor [motopress](https://wordpress.org/support/users/motopress/)
 * (@motopress)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/adding-description-to-widget/#post-10725171)
 * Hi [@konti](https://wordpress.org/support/users/konti/),
    Thank you for your 
   question and accept apologies for a delay. You can get this done by [overriding plugin template files](http://www.getmotopress.com/documentation/wordpress/plugins/timetable/override-templates/).
   For example you can add the code below:
 *     ```
       <p class="event-description">
           <?php echo $event->description ?>
       </p>
       ```
   
 * to the following file overriding it within your theme folder
    _\wp-content\plugins\
   mp-timetable\templates\theme\**widget-upcoming-view.php**_
    -  This reply was modified 7 years, 8 months ago by [motopress](https://wordpress.org/support/users/motopress/).
 *  Thread Starter [konti](https://wordpress.org/support/users/konti/)
 * (@konti)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/adding-description-to-widget/#post-10752715)
 * Thank you for your answer, working perfectly. But I have another question and
   would be fantastic if You could help me. I have idea to make this description
   on hover with tooltip on “Info” word. But in same time, If there will be no description,
   I dont want to have this “Info” word. My code looks like this:
 * <div class=”info”><i class=”fa fa-info-circle”></i> Info
    <p class=”description”
   > <?php echo $event->description ?> </p></div>
 * I added css to classes and tooltip works fine. But if some event doesnt have 
   description, it looks bad with not clickable “Info” word.
 * Is any possible to add function If, to visible it only when description will 
   be, and not visible when there will be no description?
 * Looking forward for answer.
    Regards
 *  Plugin Contributor [motopress](https://wordpress.org/support/users/motopress/)
 * (@motopress)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/adding-description-to-widget/#post-10793317)
 * Hi [@konti](https://wordpress.org/support/users/konti/),
    I’m sorry for a late
   reply. You may try adding this condition to check whether there is description
   available for this timeslot:
 *     ```
       <?php if (!empty($event->description)) {		
           echo $event->description;
       } 
       ?>
       ```
   

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

The topic ‘Adding description to widget’ is closed to new replies.

 * ![](https://ps.w.org/mp-timetable/assets/icon-256x256.png?rev=2665792)
 * [Timetable and Event Schedule by MotoPress](https://wordpress.org/plugins/mp-timetable/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mp-timetable/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mp-timetable/)
 * [Active Topics](https://wordpress.org/support/plugin/mp-timetable/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mp-timetable/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mp-timetable/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [motopress](https://wordpress.org/support/users/motopress/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/adding-description-to-widget/#post-10793317)
 * Status: resolved