Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 573863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:46:10+00:00 2026-05-13T13:46:10+00:00

I am trying to work around a plugin for Word Press called Event Calendar

  • 0

I am trying to work around a plugin for Word Press called “Event Calendar 3”. This plugin lets you create events and then feeds them into a SQL table in the WordPress database. However, this plugin does not discriminate between different types of events, eg repeating events, one-off events.

The beginning of my solution was to create a category called “Repeating Event”, and when I created an Event post, also tagged it Repeating Event. I then tried to structure a query that would return posts that were categorized “Events,” but would also exclude “Repeating Events.”

$query = SELECT *
         FROM wp_posts p, wp_ec3_schedule s, wp_terms ts, wp_term_taxonomy t, wp_term_relationships r
WHERE p.ID = s.post_ID
AND r.term_taxonomy_id = t.term_taxonomy_id
AND ts.term_id = t.term_id
AND name != "Repeating"

The trouble is, posts that have the category “Repeating” also have the category “Events” (they have to in order to show up in the calendar). So the posts that have the category “Repeating” still show up because their category ‘name’ is not just “Repeating,” it’s “Events” as well!

The WordPress function query_post() doesn’t help because not only do I have to filter by category (which query_post() does), but I also need to be able to specify that the rows returned by the query are only those that have a start date after today (there is a column in the wp_ec3_schedule table called ‘start’ that lists the start time of the event).

Any suggestions?

Thx.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:46:11+00:00Added an answer on May 13, 2026 at 1:46 pm

    Not sure that I understand everything, but take a look at this example. This lists post_id of posts on my site which are in category how-to, but are not in categories database and code.

    SELECT  `object_id` AS PostID
    FROM    `wp_term_relationships` AS r
            JOIN `wp_term_taxonomy` AS x ON x.`term_taxonomy_id` = r.`term_taxonomy_id`
            JOIN `wp_terms` AS t ON t.`term_id` = x.`term_id`
    WHERE   x.`taxonomy` = 'category'
            AND `slug` = 'how-to'
            AND `object_id` NOT IN
               (
                SELECT `object_id`
                FROM `wp_term_relationships` AS r
                JOIN `wp_term_taxonomy` AS x ON x.`term_taxonomy_id` = r.`term_taxonomy_id`
                JOIN `wp_terms` AS t ON t.`term_id` = x.`term_id`
                WHERE   x.`taxonomy` = 'category'
                AND `slug` IN  ( 'database', 'code' )
                );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to wrap my head around how threads work in Python, and
I'm trying to get my head around why the following doesn't work. I have
DISCLAIMER : this is the classic case of .NET GUI trying to work his
I am trying to understand an issue where event-listener registration on plugins doesn't work
Programming Student here...trying to work on a project but I'm stuck. The project is
I have been trying to work my way through Project Euler, and have noticed
Weve recently been trying to work on an application that uses pandastream to encode
I'm trying to work through Project Euler and I'm hitting a barrier on problem
I'm trying to work through the problems on projecteuler.net but I keep running into
I'm trying to work my way through Ron Jeffries's Extreme Programming Adventures in C#.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.