Skip to content

Instantly share code, notes, and snippets.

View matgargano's full-sized avatar

Mat Gargano matgargano

View GitHub Profile
@matgargano
matgargano / .user.ini
Last active May 8, 2020 12:51 — forked from devotoare/.user.ini
Wordfence for Trellis/Bedrock
; Wordfence WAF
auto_prepend_file = '/srv/www/example.com/current/config/wordfence-waf.php'
; END Wordfence WAF
@matgargano
matgargano / page.php
Last active August 27, 2016 15:27 — forked from ckschmieder/page.php
Calling in custom image field that is setup to require user to crop image to set aspect ratio. Replaced Featured Image.
<?php
$image = get_field('top_image');
$link = get_field('link', $image['ID']);
?>
<figure class="featured-image">
<img src="<?php echo esc_url( $image['url'] ); ?>" alt="<?php esc_attr_e( $image['alt'] ); ?>" />
</figure>
<?php
/**
*
*
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package AAFP
*/
@matgargano
matgargano / customloop.php
Last active August 24, 2016 15:18 — forked from ckschmieder/customloop.php
Want to loop thu PAGES with the category slug 'behavior'
<?php
global $post;
$my_query_args = array(
'posts_per_page' => -1, // change this to any number or '0' for all
'post_type' => 'page',
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'behavior',
body {
padding:100px;
}
.top {
position:absolute;
top:0;
left:0;
}