Support » Plugin: Events Manager » Events widget title change to image

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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.

    angelo_nwl

    (@angelo_nwl)

    NetWebLogic Support

    Hi,

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

    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.

    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!

    just marking this as resolved.

    angelo_nwl

    (@angelo_nwl)

    NetWebLogic Support

    thanks for the update.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Events widget title change to image’ is closed to new replies.