Events Manager
[resolved] Events widget title change to image (7 posts)

  1. Tinwetari
    Posted 3 years ago #

    I'm using the widget that displays a list of events in my sidebar. I have a specific look for my website that requires me to replace the title of the widget with an image.

    Instead of using text, I'm using an image with the title in the alt tag. However, pasting the image src html within the title field doesn't work.

    Does any one know how I can replace the title text with an image?

    To see what my sidebar style looks like, go here:


  2. caimin_nwl
    NetWebLogic Support
    Posted 3 years ago #

    Unless I'm mistaken, it looks like you're adding the arrow image via CSS. In which case you should be able to apply the same styles to the EM widgets too.

  3. angelo_nwl
    NetWebLogic Support
    Posted 3 years ago #


    another way is to use [events_list] shortcode in text widgets - http://wordpress.org/plugins/shortcodes-in-sidebar-widgets/

  4. Tinwetari
    Posted 3 years ago #

    Thank you for showing me that plugin, angelo! This might be a quick-fix for the sake of launching on time, but it'd be nice if I could use the Event Manager widget.

    Caimin: I didn't put those arrows in. That's automatically part of the theme I downloaded. It looks like it places those arrows on every li tag on the site. I tried to paste the title image within the format box, but that made the title image appear above every event in the widget (...oops, should've seen that coming).

    I tweaked the em-events.php to use echo "image coding inserted here" right before the ul tag, but the image never appeared.

    I could probably add the image to the h4 tag of the widget as a background, but I want to avoid this option.

  5. Tinwetari
    Posted 3 years ago #

    I figured it out!

    When I attempted to tweak the em-events.php yesterday, I also tried to add an else condition to the echo $args['before_widget'], but I must've not coded it correctly. Originally I added else { echo "image stuff"; } by itself.

    Today, I changed it to include the before_/after_title arguments, and it works great! As long as the title field is empty in the widget, it will display the image.

    echo $args['before_widget'];
        	if( !empty($instance['title']) ){
    		    echo $args['before_title'];
    		    echo apply_filters('widget_title',$instance['title'], $instance, $this->id_base);
    		    echo $args['after_title'];
        	} else {
    		    echo $args['before_title'];
    		    echo '<img src="http://www.hardwareretailing.com/test/wp-content/uploads/2013/06/sidebar-industry-calender.jpg" alt="Industry Calendar" title="Industry Calendar" /><br />';
    		    echo $args['after_title'];

    Thank you for your help!

  6. Tinwetari
    Posted 3 years ago #

    just marking this as resolved.

  7. angelo_nwl
    NetWebLogic Support
    Posted 3 years ago #

    thanks for the update.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic