The $pega
variable in the show_all
function is not the same thing as the $pega
variable in the get_future_conferences
function. The latter one doesn't have any value. show_all
doesn't appear to be called anywhere, and the value of $pega
passed to it doesn't get used. Did you mean to write show_all()
and get_future_conferences($pega)
instead and call show_all()
at some point instead?
Besides, why would you want a function called "get future conferences" to return past conferences?
Aside from that, there is probably something you can do with the array sent to get_posts
that controls criteria for sorting and filtering.
Or if all that is set in stone with no way to control it, and you really are stuck with only being able to request conferences on or after a certain date (I suspect not, because you're explicitly asking for that in the given code) then choose a date sufficiently far in the past.