i’m trying to modify a custom shortcode that was written for me in the past.
The overall code defines a ‘tag’ that is used in the shortcode…this is called “$month_filter”.
The overall code defines a date by “this month” and “last month” which is only a ‘first day of month’ format for the data being looked at.
Current IF statements is:
if ( ($month_filter == ‘current’) and $lead_date < $first_of_month)
I’m trying to create a new statement looking for data that is dated less than the “first of this month” and greater than or equal to the “first of last month”.
I have tried a lot of variations of this:
if ( ($month_filter == ‘last’) and $lead_date < $first_of_last && $lead_date > $first_of_month)
But this is not working.
Keep in mind this is actually a reverse type of look up…my code is saying "if he wants data from last month, look at the data and see if it was dated prior to the First of Last Month and also if it was dated after the First of This Month…and if it meets both of those criteria…skip past that data.
This way, it is only displaying what is left over in between those two criteria.
I’ve been racking my brain for hours on this and have tried many different variations of that line…Please shoot me some guidance…I feel like i’m overlooking something simple.