Create default image path filter

Create default image path filter

In this WP Event Manager tutorial, you will learn about how you can create a default image path filter.

Every event  organizer tries to gain as much attention as possible from their visitors or target audiences and using an attractive event banner offers the most useful way of attracting people towards an event.

Sometimes, the banner of an event does not get the importance that it deserves from the event organizers and they tend to forget about it. Not having any event banner is certainly not a good option. To avoid such things, one can create a default image path filter which adds a default banner to the event.

To create a default image path filte, you need to follow the below mentioned steps:

  1. Create a child theme and open function.php.
  2. Open your active theme function.php.
  3. Add the following code :
  1. function default_event_banner($image_url)
  2.  {
  3.      return $image_url;
  4.  } 
  5. add_filter('event_manager_default_event_banner', 'default_event_banner');

    • Related Articles

    • How to replace default event banner placeholder image

      Replace default event banner placeholder image In order to add the default image in the banner, when someone does not submit any event banner, you can add the following code Open your child theme, Add the code into the funtions.php file: add_filter( ...
    • Create or pick categories from Free/ Core WP Event manager

      Events are classified into various types based on the kind of visitors they have. Visitors come from different backgrounds. That is why an event organizer or admin must ensure that they make a lot of event categories available to their clients. This ...
    • Create or pick categories from Free/ Core WP Event manager

      Events are classified into various types based on the kind of visitors they have. Visitors come from different backgrounds. That is why an event organizer or admin must ensure that they make a lot of event categories available to their clients. This ...
    • Add custom field in Search filter

      It is possible for the users of WP Event Manager to add new filters to the event search form. In this guide we will show you how you can do it. Creating a custom event search filter WP Event Manager’s [Events] shortcode shows a search filter on the ...
    • Installation of WP Event Manager

      Automatic Installation of FREE WP Event Manager Installing WP Event Manager is just a matter of a few clicks. You can add WP Event Manager to your website by using the dashboard offered to you at the backend of the CMS. To install the plugin ...