Show most popular post of last 12 months
Just as @Rarst suggested, you must have your $args defined within your function. You could solve it by using global variables, but we don’t want too many such variables flying around! Check out the PHP docs on the scope of a variable or write your code in a class. You can also simplify your query. … Read more