This file contains 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 is a collection of my most used or most useful PHP and JS snippets | |
**Disclaimer, I didn't write most of these - I just curated them over the years** |
This file contains 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
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
This file contains 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
/** | |
* Makes a BB Column clickable. | |
* Pre-requisite: There must be an A Tag contained within the column element. | |
*/ | |
jQuery(document).ready(function($){ | |
$('.clickable-col').css('cursor', 'pointer'); | |
$('.clickable-col').on('click', function(event){ | |
$(this).find('a')[0].click(); | |
}); |
This file contains 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
function year_shortcode() { | |
$year = date('Y'); | |
return $year; | |
} | |
add_shortcode('year', 'year_shortcode'); |
This file contains 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
/*Add this CSS to the Designs > Custom CSS section of your IDX Broker contorl panel.*/ | |
/*Just swap out the below hex values for whatever colors you prefer*/ | |
/*Background color for the navigation bar*/ | |
.IDX-navbar-header { | |
background-color: #000000; | |
} | |
#IDX-navbar-collapse { | |
background-color: #000000; | |
} |
This file contains 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
<script> | |
idx(document).ready(function() { | |
idx(".IDX-panel-collapse").each(function() { | |
this.classList.remove("IDX-in"); | |
}); | |
}); | |
</script> |
This file contains 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
@media only screen and (max-width: 500px) { | |
.IDX-resultCellContainer { | |
display: flex; | |
flex-direction: column; | |
} | |
.IDX-resultsCell { | |
width: 100%; | |
} | |
.IDX-resultsPhoto { | |
display: flex; |
This file contains 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 | |
/* | |
Plugin Name: Communities Custom Post Type | |
Description: Custom Post Type for Wayne Stratton's custom website projects. | |
Author: Wayne Stratton | |
Author URI: http://www.waynestratton.org | |
*/ | |
add_action( 'init', 'triangle_community_cpt' ); |
This file contains 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
/** | |
* Listify - Default Image for Listings | |
*/ | |
function custom_default_listify_cover_image( $image, $args ) { | |
global $post; | |
if ( $image || $post->post_type != 'job_listing' ) { | |
return $image; | |
} | |
This file contains 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 | |
/** | |
* Listify child theme. | |
*/ | |
function listify_child_styles() { | |
wp_enqueue_style( 'listify-child', get_stylesheet_uri() ); | |
} | |
add_action( 'wp_enqueue_scripts', 'listify_child_styles', 999 ); | |
/** Place any new code below this line */ |
NewerOlder