Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5540

Sharon Murphy on "[Plugin: All-in-One Event Calendar] Custom MySQL query?"

$
0
0

Line 3 is missing an "&" between ai1ec and tag_id. If that was a typo, try it with the "&":

post_type=ai1ec_event&post_status=publish&posts_per_page=6&ai1ec&tag_id=2368

Quotes will cause problems, so it makes sense that the last two would be problematic.

If you want to go another route, I would recommend using the standard WP_Query, info found here:

https://codex.wordpress.org/Class_Reference/WP_Query

Your $args would look something like this:

$args = array(
  'post_type' => 'ai1ec_event',
  'post_status' => 'publish',
  'posts_per_page' => 6,
  'tag_id' => 2368,
);

Finding the start date I think would involve creating a meta query for that post type.

After searching a bit online, I found this bit of code that could be another option you could use:

http://pastebin.com/AKShCebx

Hope this helps.


Viewing all articles
Browse latest Browse all 5540

Trending Articles