Title: Custom Scope
Last modified: February 16, 2018

---

# Custom Scope

 *  Resolved [nightsun73](https://wordpress.org/support/users/nightsun73/)
 * (@nightsun73)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/custom-scope-2/)
 * Hi,
 * Is is possible to create custom scopes? I’m looking to impliment a this_weekend
   scope that includes friday/saturday/sunday.
 * I would also like to create a:
    this_week scope that omits today this-month scope
   that omits current week this_year scope that omits current month
 * I’m happy to code this up myself if you can pointme in the right direction. I’ve
   had a poke around in eme_events.php and I have tried to copy and imliment the
   this_week scope and change the limit dates, but to no avail.
 * Thanks
    L
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-scope-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/custom-scope-2/#post-9982421)
 * Just use a wider scope and then use a filter to eliminate the events you don’t
   like. I think the filter eme_event_list_filter should work for you.
 *  Thread Starter [nightsun73](https://wordpress.org/support/users/nightsun73/)
 * (@nightsun73)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/custom-scope-2/#post-9982616)
 * Had a think around the problem and found the easiest way to solve it was to write
   my own shortcode that built your shortcode. I’ll leave it here as it may help
   others.
 * function weekend_func() {
 *  if (date(‘Y-m-d’, strtotime(‘today’)) == date(‘Y-m-d’, strtotime(‘Friday’))){
   
   $friday= date(‘Y-m-d’, strtotime(‘today’)); } else { $friday= date(‘Y-m-d’, strtotime(‘
   Friday’)); }
 *  $friday= date(‘Y-m-d’, strtotime(‘today’));
    $sunday= date(‘Y-m-d’, strtotime(‘
   next Sunday’)); return “[eme_events scope=” . $friday .”–” . $sunday . ” limit
   =0 showperiod=daily show_ongoing=0 ]”; } add_shortcode( ‘this_weekend’, ‘weekend_func’);

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

The topic ‘Custom Scope’ is closed to new replies.

 * ![](https://ps.w.org/events-made-easy/assets/icon-256x256.png?rev=1856035)
 * [Events Made Easy](https://wordpress.org/plugins/events-made-easy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-made-easy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-made-easy/)
 * [Active Topics](https://wordpress.org/support/plugin/events-made-easy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-made-easy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-made-easy/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [nightsun73](https://wordpress.org/support/users/nightsun73/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/custom-scope-2/#post-9982616)
 * Status: resolved