This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .gallery-carousel { | |
| display: block; | |
| margin-bottom: 1em; | |
| } | |
| .gallery-carousel:not(.columns-1) .blocks-gallery-item:last-child { | |
| margin-right: 16px; | |
| } | |
| .gallery-carousel .blocks-gallery-item { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function ($) { | |
| $('.gallery-carousel .blocks-gallery-grid').flickity({ | |
| // At the end of cells, wrap-around to the other end for infinite scrolling. | |
| wrapAround: true, | |
| // Align cells within the carousel element. | |
| cellAlign: 'left', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'pre_get_posts', 'lit_event_date_filter' ); | |
| function lit_event_date_filter($query) { | |
| $date_now = date('Ymd'); | |
| $query->set( 'meta_query', array( | |
| array( | |
| 'key' => 'event_date', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| remove_action( 'pre_get_posts', 'lit_event_date_filter' ); | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %%EPID%% .oxy-posts { | |
| display: flex; | |
| flex-direction: row; | |
| flex-wrap: wrap; | |
| } | |
| %%EPID%% .oxy-post { | |
| width: calc(100% / 3); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %%EPID%% .oxy-posts { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr 1fr; | |
| } | |
| @media (max-width: 1120px) { | |
| %%EPID%% .oxy-posts { | |
| grid-template-columns: 1fr 1fr; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'pre_get_posts', 'lit_brand_filter' ); | |
| function lit_brand_filter($query) { // Change lit_brand_filter to custom name, different each time you use | |
| $taxonomy = 'brand'; // Change to taxonomy name | |
| $terms = get_the_terms( get_the_ID(), $taxonomy ); | |
| $tax_query = array( | |
| 'taxonomy' => $taxonomy, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // first code block | |
| add_action( 'pre_get_posts', 'lit_taxonomy_term_filter' ); | |
| function lit_taxonomy_term_filter($query) { | |
| $taxonomy = 'category'; // My Taxonomy | |
| $terms = array('travel', 'food'); // My terms to exclude | |
| $tax_query = array( | |
| 'taxonomy' => $taxonomy, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_shortcode( 'repeater_post_id', 'lit_post_class_sc' ); | |
| /** | |
| * Shortcode for adding post classes inside Oxygen Repeater | |
| */ | |
| function repeater_post_id( $atts, $content = null ) { | |
| $post_id = get_the_id(); | |
| return '<div id="prefix-'. $post_id . '" />' . $content . '</div>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('wp_head', 'your_function_name'); | |
| function your_function_name() { | |
| echo '<meta name="robots" content="noindex">'; | |
| } |