Support

Home Forums Events Calendar Add-on EE4 Calendar

EE4 Calendar

Posted: August 17, 2014 at 2:35 pm

Viewing 4 reply threads


James Miller

August 17, 2014 at 2:35 pm

I am looking to put the same query in place for the calendar, obviously this need adjusting to suit the calendar, the page is linked at.

http://stagingarea.staffordshirechambers.co.uk/events-listing/

I can use it as one of the two following queries

$event_query = “SELECT SQL_CALC_FOUND_ROWS *
FROM wp_posts
INNER JOIN wp_esp_datetime
ON wp_posts.ID = wp_esp_datetime.EVT_id
INNER JOIN wp_esp_event_meta
ON wp_posts.ID = wp_esp_event_meta.EVT_id
LEFT JOIN wp_postmeta pm_value1
ON pm_value1.post_id = wp_posts.ID
LEFT JOIN wp_postmeta pm_value2
ON pm_value2.post_id = wp_posts.ID
LEFT JOIN wp_term_relationships
ON wp_term_relationships.object_id = wp_posts.ID
LEFT JOIN wp_term_taxonomy
ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_ID
LEFT JOIN wp_terms
ON wp_term_taxonomy.term_ID = wp_terms.term_id

WHERE (DTT_EVT_end >= NOW() AND post_status = ‘Publish’)

“;

Or

$atts = array(
‘title’ => NULL,
‘limit’ => $no,
‘css_class’ => NULL,
‘show_expired’ => FALSE,
‘month’ => NULL,
‘category_slug’ => $event_cat_slug,
‘order_by’ => ‘start_date’,
‘sort’ => ‘ASC’,

/* Matching postmeta values in query
‘meta_query’ => array (
‘relation’ => ‘AND’,
array (
‘key’ => $site_tag_enabled,
‘value’ => $event_filter_site,
‘compare’ => ‘Like’,
),
array (
‘key’ => $sector_tag_enabled,
‘value’ => $event_filter_sector,
‘compare’ => ‘Like’,
),
),
);

I had a look into the shortcode for the calendar and not really not sure where i need to go to. The postmeta table is mainly the main table i need to query as i need to use meta_queries.

This is something we are looking to get finished next week. Do we get customisation support from you guys as this is one area i could do with the help with.


Dean

August 18, 2014 at 4:50 am

Hi,

Customisations are not covered under general support, but we can help where we can.

Can you advise exactly what you are trying to achieve and I can hopefully point you in the right direction with it. Are you trying to add something to the tooltips? Something else?


James Miller

August 18, 2014 at 7:10 am

I have added two custom fields within ACF, they are on the backend of espresso events. What i need to is filter /query the events on the calendar relating to these two field.

From what i know of:

ACF gets stored in the wp_postmeta table uses the standard meta_query. As you can see from the link i sent you, i have done this with the event listing. I need to follow the same principal of the category and venue drop down for the two custom fields what i put in place.

I need to know:

Can i amend the query accordingly to the two fields?
Can i do this in my own template and pull in the calendar based on a custom query?


James Miller

August 20, 2014 at 5:33 am

Hi,

Any updates on this?


Dean

August 22, 2014 at 6:30 am

Hi James,

Firstly my apologies for the delay in responding to you.

I’ve taken a look at the files and I’ll be honest in that I don’t think this is going to be an easy thing to do.

Most of the files are interconnected and it looks like you would need to modify most of them to achieve what you are after (the standard templates are simpler).

My colleague suggests using a WHERE clause, though I think you may already be aware of that.

Another thing though, is if you find a place where you feel a hook (action or filter) would be suitable, you can make a pull request (we don’t guarantee inclusion, but we are quite relaxed about adding them).

You can do a pull request here https://github.com/eventespresso (Github account required – free is fine – and you will need to request access).

Viewing 4 reply threads

The support post ‘EE4 Calendar’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso