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 $count = count( get_field( 'field-name' ) ); ?> // can be used for counting rows in a repeater. works well w/ slick slider if you only want a slider on > 2 counts |
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 exampleAjaxResponse() | |
{ | |
die(); // or exit; or wp_die(); | |
} | |
// Note you need both of them to work for logged in & not logged in users. | |
add_action('wp_ajax_your_action_name', 'exampleAjaxResponse'); |
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 | |
$image = get_field( 'image' ); | |
if ( ! empty( $image ) ) { | |
// thumbnail | |
$size = 'medium'; | |
$thumb = $image['sizes'][ $size ]; | |
} else { | |
$thumb = '/wp-content/themes/topfloor-parcel/assets/images/placeholder.png'; | |
} ?> |
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
html { | |
scroll-behavior: smooth; | |
} | |
section { | |
padding: 3rem 0; | |
} | |
.grid-container { | |
width: 100%; | |
@media (min-width: 1500px) { |
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
// count for wpquery, goes here | |
$the_query = new WP_Query( $args ); | |
$count = $the_query->found_posts; | |
// then inside of the content | |
if ( $count > 2 ) { | |
echo '<div id="np-slider-three" class="np-slider">'; | |
} else { | |
echo '<div class="grid-x grid-margin-x medium-up-3">'; | |
}; |
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 li:before { | |
font-family: "Font Awesome 5 Pro"; | |
content: "\f00c"; | |
margin: 0 7px 0 -26px; | |
color: #9a7ba3; | |
} |
NewerOlder