This file contains 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
document.addEventListener("bricks/ajax/end", () => { | |
window.scroll({ | |
top: 0, | |
behavior: 'smooth' | |
}); | |
}) |
This file contains 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 | |
global $post; | |
//Get the images ids from the post_metadata | |
$images = acf_photo_gallery('photo_gallery', $post->ID); | |
//Check if return array has anything in it | |
if( count($images) ): | |
//Cool, we got some data so now let's loop over it | |
foreach($images as $image): |
This file contains 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( 'get_previous_post_where', 'my_prev_post_where', 20 ); | |
function my_prev_post_where( $sql ){ | |
if ( !is_main_query() || !is_singular('post') ) { | |
return $sql; | |
} | |
return str_replace('<', '>', $sql); |
This file contains 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
.join('\n') |
This file contains 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
{"content":[{"id":"cbqhpm","name":"section","parent":0,"children":["uoccov"],"settings":{}},{"id":"uoccov","name":"container","parent":"cbqhpm","children":["jhrajz"],"settings":{"taxonomies":["category","post_tag"],"extrasCustomQueryCode":"<style>\nh1.my-heading {\n color: crimson;\n}\n</style>\n\n<h1 class='my-heading'>Just some custom HTML</h1>","_alignItems":"center","_gridTemplateColumns":"1fr 1fr 1fr"}},{"id":"jhrajz","name":"xproslider","parent":"uoccov","children":["tovupw"],"settings":{"slideAlignHorizontal":"center","slideAlignVertical":"center","arrows":"true","prevArrow":{"library":"fontawesomeSolid","icon":"fas fa-angle-left"},"nextArrow":{"library":"fontawesomeSolid","icon":"fas fa-angle-right"},"perPage":"6","gap":"20","conditionaljustifyContent":"center","perPage:tablet_portrait":"2","perPage:mobile_landscape":"1","_cssCustom":"/* change item to CSS grid */\n#brxe-jhrajz .brxe-xcontenttimeline .x-content-timeline_list[data-x-horizontal=\"true\"] .x-content-timeline_item {\n display: grid;\n |
This file contains 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 | |
function maybePostLink( $field ) { | |
$loopObject = \Bricks\Query::get_loop_object(); | |
if ( ! is_array( $loopObject ) ) return false; | |
$post_id = $loopObject[$field] ?? ''; // actual field | |