I'm using a plugin (Time.ly) which allows for shortcodes. The shortcode values set the display. I'd like to set one of the value's via current date and return the first of the month. Can I modify this with javascript or had the shortcode been digested by PHP and I need to use functions.php
?
Given shortcode :
[ai1ec view="agenda" events_limit="5" cat_name="metalsmithing-lvl-1" display_filters="false" exact_date="09-01-2016"]
I'd want to always have exact_date="FIRST OF CURRENT MONTH"
Notes to myself: research completed possible approach Write My Own Shortcode
since the time that I originally posted I wrote a custom shortcode that is partially working. I need to modify it to pass the unique cat_name="TO BE PASSED IN"
. (something I've never done before).
add_shortcode("bsm_unique_course_event_stream","bsm_this_month_cal");
function bsm_this_month_cal($atts,$content =null){
$first_day_this_month = date('m-01-Y');
$temp = "{$first_day_this_month}";
$con = "[ai1ec view=\"agenda\" events_limit=\"5\" cat_name=\"metalsmithing-lvl-1\" display_filters=\"false\" exact_date=\"$temp\"]";
return do_shortcode($con);
}