• Resolved devmgmi

    (@devmgmi)


    I can’t seem to find a way to have the monthly filter dropdown load on current month, it only loads on “select month”. I found where I can change it (eme_filters.php) but this area only accepts text, not PHP. Since I’m not a wiz in PHP can anyone help me make this a dynamic current month and year?

    Currently using this for the filter dropdown -> [eme_filterform scope_count=3 submit=GO ]

    https://wordpress.org/plugins/events-made-easy/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter devmgmi

    (@devmgmi)

    Figured this out.

    In plugin files, change line 52 in eme_filters.php, from $scope[0] = __(‘Select Month’,’events-made-easy’); to $scope[0] = $current_month = date(‘F Y’);

    Plugin Author Franky

    (@liedekef)

    See this change to help you without changing the code:
    https://plugins.trac.wordpress.org/changeset/1393404

    Thread Starter devmgmi

    (@devmgmi)

    Do I place the following in my functions? I tried that and it didn’t work.

    $eme_date_obj->addOneMonth();
    }
    if (has_filter(’eme_month_scope_filter’)) $scope=apply_filters(’eme_month_scope_filter’,$scope);
    return $scope;
    }

    … it breaks my site

    Plugin Author Franky

    (@liedekef)

    That is code that will be in the next version of the EME plugin, not in your functions.php.
    The EME doc has info/pointers on how to use wordpress filters.

    Thread Starter devmgmi

    (@devmgmi)

    Any idea when this update will happen?

    Plugin Author Franky

    (@liedekef)

    Nope. Either integrate this changeset yourself or just be patient …

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Month filterform to load on current month’ is closed to new replies.