Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
<!-- wp:cover {"url":"https://picsum.photos/1024/430","id":2100,"dimRatio":50,"customOverlayColor":"#886049","isUserOverlayColor":false,"style":{"color":{"duotone":"var:preset|duotone|dark-grayscale"}},"layout":{"type":"constrained"}} --> | |
<div class="wp-block-cover"><span aria-hidden="true" class="wp-block-cover__background has-background-dim" style="background-color:#886049"></span><img class="wp-block-cover__image-background wp-image-2100" alt="" src="https://picsum.photos/1024/430" data-object-fit="cover"/><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","fontSize":"large"} --> | |
<p class="has-text-align-center has-large-font-size">Cover / Hero</p> | |
<!-- /wp:paragraph --></div></div> | |
<!-- /wp:cover --> | |
<!-- wp:paragraph --> | |
<p>This is a paragraph block. Frankfurter beef esse do non turducken strip steak sint in pork chop commodo doner sirloin beef ribs. Qui doner boudin, turkey prosciutto beef ribs sed aliqua. Occaecat quis picanha, pork chop fatba |
<?php | |
/** | |
* Changes the links on post terms block for job listing category terms. | |
* | |
* @param string $block_content The block content. | |
* @param array $block The full block, including name and attributes. | |
* @param WP_Block $instance The block instance. | |
* | |
* @return string $block_content The block content. | |
*/ |
<?php | |
/** | |
* Event query with GenerateBlocks | |
* Show only events that are happening in future, and order them from sooner to later | |
* @link https://community.generateblocks.com/t/generateblocks-query-loop-args-slowing-pages-way-down/903/9 | |
* @link https://community.generateblocks.com/t/use-gb-query-loop-for-related-post/688/2 | |
*/ | |
function gb_query_events( $query_args, $attributes ) { |
/* Buttons as TABS */ | |
.site .triggers .gb-button { | |
color: var(--contrast-2); | |
background-color: var(--base-2); | |
} | |
.site .triggers .gb-button:hover, | |
.site .triggers .gb-button:focus, | |
.site .triggers .gb-button:target, | |
.site .triggers .gb-button[aria-selected="true"] { |
<?php /** | |
* Enqueue the assets for the filtering staff feature | |
*/ | |
function apuri_staff_filtering_assets() { | |
if ( is_page( array( 'nastavnici', 'lecturers' ) ) ) : | |
wp_enqueue_style( 'apuri-staff-filtering-assets', 'your plugin root' . 'assets/filter_and_search.css', false, '3.0.0.', 'all' ); | |
wp_enqueue_script( 'apuri-staff-filtering-assets', 'your plugin root' . 'assets/filtering_and_search.js', false, '3.0.0.', 'all' ); | |
endif; | |
} |
<?php | |
/** | |
* Add custom colors to the WordPress editor via `add_theme_support` | |
* | |
* This takes the existing colours (if your theme or a plugin has set any) | |
* and combines them with a new set of colours defined in the function | |
* | |
* New colours should be visible in the various color pickers found in | |
* WordPress admin | |
*/ |
Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
<?php | |
/** | |
* Returns the primary term for the chosen taxonomy set by Yoast SEO | |
* or the first term selected. | |
* | |
* @link https://www.tannerrecord.com/how-to-get-yoasts-primary-category/ | |
* @param integer $post The post id. | |
* @param string $taxonomy The taxonomy to query. Defaults to category. | |
* @return array The term with keys of 'title', 'slug', and 'url'. | |
*/ |
<?php | |
// Return a custom order of the default blocks on an event. | |
// to change the order of the blocks, arrange the lines the blocks are added to the array. | |
// To remove a block from being added by default, comment out the line for the block. | |
add_filter( 'tribe_events_editor_default_template', function( $template ){ | |
// initiate our array | |
$template = array(); |
@mixin custom-foundation-typography($reset: true) { | |
@if ($reset) { | |
// Typography resets | |
div, | |
dl, | |
dt, | |
dd, | |
ul, | |
ol, | |
li, |