Skip to content

Instantly share code, notes, and snippets.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<?php
if(isset($_GET['trigger']) && $_GET['trigger'] == 1) {
error_reporting(E_ALL);
exec('gpio write 7 0');
usleep(1000000);
exec('gpio write 7 1');
}
?>
<ul class="employees__list">
<?php $counter = 0; $class = 'even'; ?>
<?php while(have_rows('employee')): the_row(); ?>
<?php
if($counter % 2 == 0) {
if($class == 'odd') {
$class = 'even';
} else {
$class = 'odd';
}
<ul class="employees__list">
<?php $counter = 1; ?>
<?php while(have_rows('employee')): the_row(); ?>
<li class="employees__list__employee<?php if($counter % 2 ==0){ echo ' even'; }?>">
<?php $image = wp_get_attachment_image_src(get_sub_field('image'), 'bio-pic'); ?>
<div class="employees__list__employee--image">
<?php if($image): ?>
<img src="<?php echo $image[0]; ?>" alt="" class="img-responsive">
<?php else: ?>
<img src="http://via.placeholder.com/600x600" alt="" class="img-responsive">