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
// This snippet will loop through my ACF Repeater Field and create a large list of websites (or whatever you want). | |
// Then it will create 4 individual lists from that large list of websites. Making it easier for me | |
// to style and/or create a 4-column list. | |
<?php | |
// Name of Repeater field | |
$names_array = get_field( 'field_name' ); | |
// Counts Users | |
$name_count = count( $names_array ); |
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
//Register for a Google Maps JS API key | |
//Make an ACF Field in options called 'api_key'. | |
if ( is_page_template( 'page-locations-single-map.php' ) ) { // Template Name | |
$api_key = get_option( 'options_api_key', '' ); | |
$api_src = add_query_arg( 'key', $api_key, '//maps.googleapis.com/maps/api/js' ); | |
wp_enqueue_script( |
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
define('WP_DEBUG', true); | |
define('WP_DEBUG_DISPLAY', false); | |
define('WP_DEBUG_LOG', true); | |
define('SAVEQUERIES', true); |
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 if ( have_rows( 'acf_repeater_field' ) ) : ?> | |
<?php $counter = 1 ; ?> | |
<?php while ( have_rows( 'acf_repeater_field' ) ) : the_row(); ?> | |
<?php | |
if ( 0 === $counter % 2 ) { | |
$class = 'even'; | |
} else { |