• Resolved Pierre_02

    (@pierre_02)


    Hi all,

    In one of my page I’ve used [events_list category=3 limit=5 pagination=1] but in that page, when a user click on a link, I want to call the same page but add the month parameter.
    How can I pass my month parameter to my shortcode before content() is called ?

    TIA,

    Pierre.

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

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

    (@angelo_nwl)

    sorry I’m afraid that this is not possible at the moment and might need lots of coding on your part to make this work.

    Thread Starter Pierre_02

    (@pierre_02)

    Hi Angelo,

    thanks for your answer.
    I’ve found a alternative to do it ;)…

    In my template, I do :
    add_filter('the_content','replace_content'); the_content();

    and my function is :

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

    BTW, I can modify on the fly my month parameter 🙂 !!

    Amicably,

    Pierre.

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

The topic ‘pass parameter to shortcode…’ is closed to new replies.