Skip to content

Instantly share code, notes, and snippets.

View DustinWStout's full-sized avatar
🏠
Working from home

Dustin W. Stout DustinWStout

🏠
Working from home
View GitHub Profile
@DustinWStout
DustinWStout / minimal-social-warfare-style-dark.css
Last active November 17, 2018 20:16
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".
.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 November 17, 2018 20:18
Minimal Social Warfare - Pro buttons style. Just add the following to your theme's style.css file.
.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;
@DustinWStout
DustinWStout / wp-dynamic-year.php
Created January 2, 2019 17:41
WordPress Dynamic Year shortcode. Just add to your functions.php file and use the [year] shortcode in post titles and content.
//* 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 / flexbox-image-group.php
Last active March 1, 2019 20:01
Display Flexbox Image Group
<?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; ?>