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 new search input */ | |
add_filter( 'get_search_form', 'my_custom_search', 100 ); | |
function my_custom_search( $form ) { | |
$newInput = '<input type="hidden" name="" value="">'; /* change to your hidden input HTML */ | |
$submit = '<input type="submit" class="search-submit" value="Search">'; |
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') |
NewerOlder