Skip to content

Instantly share code, notes, and snippets.

View 3200creative's full-sized avatar

3200 Creative 3200creative

View GitHub Profile
@3200creative
3200creative / query.php
Created September 11, 2017 22:38
Facet Filtering
<?php
$args = array(
'numberposts' => -1,
'post_type' => 'Concerts',
'facetwp' => true,
);
$the_query = new WP_Query( $args );
?>
<?php echo facetwp_display( 'facet', 'state' ); ?>
@3200creative
3200creative / txt.php
Created September 10, 2017 13:41
acf example
<?php
// filter
function my_posts_where( $where ) {
$where = str_replace("meta_key = 'event_%", "meta_key LIKE 'event_%", $where);
return $where;
}
@3200creative
3200creative / txt.txt
Created March 23, 2016 21:02
Desktopserver Setup Local Dev
http://docs.serverpress.com/article/84-how-to-open-the-desktopserver-preferences-file
@3200creative
3200creative / terminal.terminal
Created January 15, 2016 03:05
spacer in OSX Doc
defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
@3200creative
3200creative / functions.php
Created November 24, 2015 17:47
membermouse prohibit password change email
add_filter('send_password_change_email', '__return_false');
@3200creative
3200creative / script.txt
Created November 6, 2015 18:11
C4D COFFEE script - Attach Object By Spline [add coffee script to spline with child objects]
main(doc,op)
{
var i, j, k, pointcount;
i = 0;
var a = op->GetDown();//count number of children
while(a != NULL){
a = a->GetNext();
i++;
}
@3200creative
3200creative / function.php
Created June 30, 2015 21:57
Remove CSS version from CDN
function remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );
@3200creative
3200creative / function.php
Created May 25, 2015 15:21
Custom Menu Directly In WordPress Post
//* Use with shortcode: [menu name=”sitemap”]
add_action( 'init', 'my_custom_menus' );
function my_custom_menus() {
register_nav_menus(
array(
'primary-menu' => __( 'Primary Menu' ),
'secondary-menu' => __( 'Secondary Menu' ),
'footer-left' => __( 'Footer Left' ),
'footer-right' => __( 'Footer Right' ),
@3200creative
3200creative / functions.php
Last active March 28, 2019 17:52
Fontawesome Shortcode For WordPress
// Icon Shortcode Using Fontawesome by 3200creative
// to use this shortcode use the following markup [fa-icon id="option-id" class="custom-class" type="arrow" size="24" color="#ff9900"]
function icon_func( $atts ) {
$a = shortcode_atts( array(
'type' => 'Add Icon Type',
//ID is optional
'id' => '',
'size' => 'Add Size',
'color' => 'Add Color',
@3200creative
3200creative / Style.css
Created April 7, 2015 21:23
Long Hand HTML5 Post Author Box
/* Avatar
--------------------------------------------- */
.avatar {
border-radius: 50%;
float: left;
}
.author-box .avatar {
height: 88px;