Title: pass parameter to shortcode&#8230;
Last modified: August 22, 2016

---

# pass parameter to shortcode…

 *  Resolved [Pierre_02](https://wordpress.org/support/users/pierre_02/)
 * (@pierre_02)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/pass-parameter-to-shortcode/)
 * 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/](https://wordpress.org/plugins/events-manager/)

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

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/pass-parameter-to-shortcode/#post-5924362)
 * 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](https://wordpress.org/support/users/pierre_02/)
 * (@pierre_02)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/pass-parameter-to-shortcode/#post-5924363)
 * 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.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, Appointments and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Pierre_02](https://wordpress.org/support/users/pierre_02/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/pass-parameter-to-shortcode/#post-5924363)
 * Status: resolved