Skip to content

Instantly share code, notes, and snippets.

View digisavvy's full-sized avatar

Alex Vasquez digisavvy

View GitHub Profile
{"content":[{"id":"xjassy","name":"container","parent":"lgznqb","children":["oyosks"],"settings":{"_display:mobile_landscape":"block","_display":"none","_cssCustom:mobile_landscape":".table-row {\n background-color: var(--bricks-color-zqxmyk) !important;\n}\n"},"label":"Mobile Table"},{"id":"oyosks","name":"block","parent":"xjassy","children":["kyskls","yutqfe","bfghtd","zgafvm","rutdaj","odijlh","napgsg","qmqlih","ncwhow","bpchxc","wlsqmb","ypulps","jaqieg","uzmgvr"],"settings":{"_display:tablet_portrait":"grid","_gridGap:tablet_portrait":"1","_gridTemplateColumns:tablet_portrait":"1fr 1fr","_cssCustom":".div-table-mobile > div {\n padding: 1em;\n}\n\n.div-table-mobile {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-auto-rows: minmax(0px, 1fr);\n}\n\n\n.div-table-mobile > * {\n\ttext-align: center;\n}\n\n.div-table-mobile > div {\n background: #fff;\n}\n\n.div-table-mobile {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n background-color: var(--bricks-
{"content":[{"id":"xezkft","name":"container","parent":"lgznqb","children":["rzvkzk"],"settings":{"_display:mobile_landscape":"none","_cssCustom":"/* .div-table > div:nth-child(-n+3) {\n background: var(--bricks-color-zqxmyk);\n} */\n\n.div-table > div:nth-child(3n-8) {\n background: var(--bricks-color-zqxmyk);\n}\n\n.div-table > div {\n max-height: 120px;\n}","_cssCustom:tablet_portrait":".div-table > div {\n max-height: 150px;\n}","_cssCustom:mobile_landscape":".div-table > div {\n max-height: 170px;\n}"},"label":"Desktop Table"},{"id":"rzvkzk","name":"block","parent":"xezkft","children":["eymaow","oxmriy","jbhbyl","xywekp","ukbfut","zlurfz","dlxndd","ohhagr","bopokw","wbmlzg","rxydhh","btzhtv","kqxfaj","sbdivc","imlayu"],"settings":{"_display":"grid","_cssCustom":".div-table > div {\n padding: 1em;\n}\n\n.div-table {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-auto-rows: minmax(100px, 1fr);\n}\n\n.div-table > div {\n background: #fff;\n}\n\n.div-table {\n
<?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 );
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;
// Restyle admin menu separators
function dgs_separators() {
echo '<style type="text/css">#adminmenu li.wp-menu-separator {margin: 0; background: #444;}</style>';
echo '<style type="text/css">.editor-styles-wrapper .icon-bullet .wp-block-group__inner-container { display: inherit !important; }</style>';
}
add_action( 'admin_head', 'dgs_separators' );