• Resolved Pierre_02

    (@pierre_02)


    Hi all,

    as i ask in my subject I’ve noticed that if in my shortcode I used :
    [events_list category=7 limit=3 pagination=1 month=3 year=2015 scope=future]
    the parameter “scope” is not applied…
    But I need it, to show only futures event for the current month when my users load my events page…

    Does someone can help me with that problem ?

    TIA,

    Pierre.

    https://wordpress.org/plugins/events-manager/

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    yes, that will not work however can I know what do you wanted to achieve?

    Thread Starter Pierre_02

    (@pierre_02)

    Hi Angelo,

    yes, in theory what I need seemed quite simple :)… But in practice…
    The process :
    User load the event page for a category. By default on first load I show him futures events (for the selected category) for the current month.
    After what, he can, if he wants, choose an other month (from current month to 2 after) and I show him the events corresponding to its criteria.

    That’s it 🙂 !

    TIA,

    Pierre.

    Using the shortcode you gave without the future scope should work fine.

    For displaying the current month, you could use the {is_future} conditional placeholder to hide the events that have already taken place.

    http://wp-events-plugin.com/documentation/conditional-placeholders/

    Thread Starter Pierre_02

    (@pierre_02)

    YES 🙂 !!

    Thanks a lot caimin_nwl 🙂 !!

    That’s works very well !!

    Great !!

    Have a good day !

    Amicably,

    Pierre.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    thanks for the update and glad it’s working now.

    Thread Starter Pierre_02

    (@pierre_02)

    Oups :)…
    Talking too quick… By adding the conditionnal tag [events_list category=10 limit=7 pagination=1]{is_future}#_LOCATIONNAME{/is_future}[/events_list], I mystify EM, because it thinks that it returns me some records (the past ones in fact), but as I don’t display them I have nothing to show to my users. I have no message to tell them that there is no event… Nore information that tell me that EM send me an empty “feed”.
    So the content of my page is empty and I don’t know how to manage that case…

    Someone can helps me ?

    TIA.

    Amicably,

    Pierre.

    Sorry, I don’t follow 100% what’s happening. Is the {is_future} placeholder listing the location name when it shouldn’t?

    Thread Starter Pierre_02

    (@pierre_02)

    No, I’m gone try to be more clear, but as english is not my language :)…
    [events_list category=10 limit=7 pagination=1]{is_future}#_LOCATIONNAME{/is_future}[/events_list] is the content of my “textarea” in one of my page in the back-office of WP.
    This page is based on a template (supernetworking.php) in my theme folder.
    My php template do two thing :
    He pass the content to a function then show me the content :

    add_filter('the_content','replace_content');
    the_content();

    The function is :

    function replace_content($content) {
    global $month;
    	$content = str_replace('[events_list', '[events_list  month="'.$month.'" year="'.date("Y").'"', $content);
    	return $content;
    }

    By default, during the first load of the page the parameter “month” is the current month.

    Now, the concrete case, is that I have an event but it’s a past one. So my criteria with the two parameters added by my function became [events_list month="3" year="2015" category=10 limit=7 pagination=1] and find this past records.
    But as there is a conditionnal added by {is_future} EM have nothing to send me back :)… Nor a record filtred by {is_future} nor a message telling me that there is no event…

    In fact the tag {is_future} is not for filtering record it just here for displaying purpose.

    I hope have been understandable :).

    TIA for your help.

    Amicably,

    PierrE.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    maybe you can try these scope

    Accepted Arguments : future, past, today, tomorrow, month, next-month, 1-months, 2-months, 3-months, 6-months, 12-months, all

    eg. month

    Thread Starter Pierre_02

    (@pierre_02)

    Hi angelo,

    I’ve already trie to add the scope “future” (its the one who interest me) but it can’t be combinated with the parameters month and year :(…
    Who’s not really, logic to me :)…

    So, now I’m really blocked and I don’t know what to do…

    If someone has an idea, I’m really interested to hear it 🙂 !!

    TIA.

    Amicably,

    Pierre.

    Can you post the version of your filter that uses the {is_future} placeholder? I think it should work there, but maybe something isn’t quite right.

    Thread Starter Pierre_02

    (@pierre_02)

    [events_list category=10 limit=7 pagination=1 mont=3 year=2015]{is_future}#_LOCATIONNAME{/is_future}
    [/events_list]

    When I use this shortcode in my page EM find some old events for the month march so it think that it have records.
    BUT, as there is the conditionnal placeholder {is_future} it return nothing believing it returns something :$…

    TIA.

    Friendly,

    Pierre.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    I think best is to create your own custom scope using this tutorial – http://wp-events-plugin.com/tutorials/create-your-own-event-scope/

    Thread Starter Pierre_02

    (@pierre_02)

    Hi angelo 🙂 !

    ok I’ve wrote my own scope now, but how can I add it to the current criterias (the category that I have passed as parameter in my shortcode) ?
    Actually, it only apply my own custom scope bypassing the category criteria (and without any doubt my pagination and limit parameters…).
    How to merge it ?

    TIA.

    Friendly,

    Pierre.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    sorry for the confusion but did you mean combine the scope and search attributes?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘scope="future" doesn'work if month and year parameters used ?’ is closed to new replies.