Skip to content

Instantly share code, notes, and snippets.

View digisavvy's full-sized avatar

Alex Vasquez digisavvy

View GitHub Profile
<?php
$post_id = get_the_ID();
$start_time = get_post_meta( $post_id, '_EventStartDate', true );
$end_time = get_post_meta( $post_id, '_EventEndDate', true );
$time_zone = get_post_meta( $post_id, '_EventTimezoneAbbr', true );
$start_formatted_time = date_i18n( 'g:i a', strtotime( $start_time ) );
$end_formatted_time = date_i18n( 'g:i a', strtotime( $end_time ) );
SELECT *
FROM wp_postmeta
WHERE post_id = 11432
AND post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'tribe_events');
<?php
$post_id = get_the_ID();
$start_time = get_post_meta( $post_id, '_EventStartDate', true );
$end_time = get_post_meta( $post_id, '_EventEndDate', true );
$time_zone = get_post_meta( $post_id, '_EventTimezoneAbbr', true );
$start_formatted_time = date_i18n( 'g:i a', strtotime( $start_time ) );
$end_formatted_time = date_i18n( 'g:i a', strtotime( $end_time ) );

Just some snippets of working with Bricks Builder and the Events Calendar. Definitely not comprehensive. If you are comfortable finding post meta for an tribe_events post, you can then use Bricks' dynamic data tags to get most of the data you need and then write some PHP to get any data or format things as needed.

Convert the Date/Time to another format to display only start and end time.

<?php
$post_id = get_the_ID();

$start_time = get_post_meta( $post_id, '_EventStartDate', true );
$end_time = get_post_meta( $post_id, '_EventEndDate', true );

As of 4/21/2023 Eventin Plugin doesn't provide great integration for Bricks, not what I would describe as 1st party support at least.

If you want to build query loops with with Eventin data, you'll need to use Bricks' dynamic tags to get at that data.

Below are some useful snippets. I'll slowly update these until they provide a better, 1st class, integration.

Outputting Various Eventin Meta

Zoom Related

SELECT la.license_id, COUNT(*) as num_activations, c.id as customer_id, c.email
FROM wp_edd_license_activations la
INNER JOIN wp_edd_licenses l ON la.license_id = l.id
INNER JOIN wp_edd_orders o ON l.payment_id = o.id
INNER JOIN wp_edd_customers c ON o.customer_id = c.id
WHERE la.activated = 1
GROUP BY la.license_id
ORDER BY num_activations DESC
LIMIT 10;
SELECT la.license_id, COUNT(*) as num_activations, c.id as customer_id, c.email, la.site_name
FROM wp_edd_license_activations la
INNER JOIN wp_edd_licenses l ON la.license_id = l.id
INNER JOIN wp_edd_orders o ON l.payment_id = o.id
INNER JOIN wp_edd_customers c ON o.customer_id = c.id
WHERE la.activated = 1
GROUP BY la.license_id, la.site_name, c.id, c.email
ORDER BY num_activations DESC
LIMIT 10;
@digisavvy
digisavvy / Responsive Table.html
Created February 12, 2023 02:39
A basic html table constructed of divs that uses CSS to set the layout rather than table, cell, table-row markup.
<!-- Table CSS -->
<style>
#resp-table {
width: 100%;
display: table;
}
#resp-table-caption{
display: table-caption;
@digisavvy
digisavvy / BricksForge CSS Framework.css
Created January 22, 2023 08:50
From BricksForge CSS Framework
:root {
--brf-color-primary: #14854F;
--brf-color-lightGrey: #d2d6dd;
--brf-color-grey: #747681;
--brf-color-darkGrey: #3f4144;
--brf-color-error: #d43939;
--brf-color-success: #28bd14;
--brf-grid-maxWidth: 120rem;
--brf-grid-gutter: 2rem;
--brf-font-size: 1.6rem;