Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
<?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, |
It's not possible to append a row to an ACF repeater field without a custom code workaround that utilizes our API: http://www.wpallimport.com/documentation/developers/action-reference/.
The following is an example to show you how this can be done. You will almost certainly need to adjust the code snippet to make it work with your data/site.
Create a new "Manual Record Matching" import that updates the post(s): http://www.wpallimport.com/documentation/recurring/manual-record-matching/
Store the ACF data in your own dummy custom field: http://d.pr/i/3Si4ad.