Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Dustin W. Stout DustinWStout

🏠
Working from home
View GitHub Profile
@DustinWStout
DustinWStout / flexbox-image-group.php
Last active Mar 1, 2019
Display Flexbox Image Group
View flexbox-image-group.php
<?php if( have_rows('the_images') ): ?>
<div class="container">
<div class="row-1">
<div class="squares row-item">
<div class="square">
<?php
$image = get_field('square_text');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php endif; ?>
@DustinWStout
DustinWStout / wp-dynamic-year.php
Created Jan 2, 2019
WordPress Dynamic Year shortcode. Just add to your functions.php file and use the [year] shortcode in post titles and content.
View wp-dynamic-year.php
//* Enable Post Meta Shortcode Support
add_filter( 'single_post_title', 'do_shortcode' );
//* Enable Post Title Shortcode
add_filter( 'the_title', 'do_shortcode' );
//* Current Year In Post Title Shortcode
add_shortcode( 'year' , 'current_year' );
function current_year() {
@DustinWStout
DustinWStout / minimal-social-warfare-style-dark.css
Last active Nov 17, 2018
This creates a minimal and dark style for Social Warfare - Pro. Just paste it into your style.css file for your theme, and make sure you have all color settings under Style > Visual Options set to "Full Color".
View minimal-social-warfare-style-dark.css
.swp_social_panel {
background: #222;
height: 62px;
padding: 0;
border-radius: 8px;
border: 1px solid #000;
box-shadow: 0 2px 4px 0 rgba(0,0,0,.01), 0 4px 5px 0 rgba(0,0,0,.014), 0 4px 15px 0 rgba(0,0,0,.09);
}
div.nc_tweetContainer {
background: #222 !important;
@DustinWStout
DustinWStout / minimal-social-warfare-style.css
Last active Nov 17, 2018
Minimal Social Warfare - Pro buttons style. Just add the following to your theme's style.css file.
View minimal-social-warfare-style.css
.swp_social_panel {
background: #fff;
height: 62px;
padding: 0;
border-radius: 8px;
border: 1px solid #eee;
box-shadow: 0 2px 4px 0 rgba(0,0,0,.01), 0 4px 5px 0 rgba(0,0,0,.014), 0 4px 15px 0 rgba(0,0,0,.09);
}
div.nc_tweetContainer {
border: none !important;