How to pass current post id…into function for filter
-
using this filter
add_filter( 'posts_where', 'filter_where' ); $thisdate = the_date(Y-m-d,'','',false); function filter_where($where = '') { $thisdate = the_date(Y-m-d,'','',false); $where .= " AND post_date >= '$thisdate'"; return $where; }while in a loop of a post….how can i pass the variable $thisdate into the function?
i tried setting $thisdate to global…no luck…im stumped i dont really understand
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘How to pass current post id…into function for filter’ is closed to new replies.