1

I'm trying to create a custom query that uses a variable in the query. I can accomplish this using these instructions (from a comment on this blog post):

If you need to pass a variable, edit the file js_composer/include/classes/shortcodes/vc-basic-grid.php

//FILTER CUSTOM SHORTCODE BY ADDING DATE

$date_today = date(‘Ymd’);

$post_data = query_posts( str_replace(‘TODAY_DATE_CUSTOM’, $date_today, $query) );

//$post_data = query_posts( $query );

The only problem is I don't like modifying the source code of a plugin, so I was wondering if there's another way around this, or, at the very least, a way to override this particular file in my child theme?

user3325749
  • 171
  • 1
  • 11

0 Answers0