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
// Takes you to the site's base url and appends '/wp-admin' | |
javascript:(function(){ var url = !window.location.origin ? window.location.protocol+'//'+window.location.host : window.location.origin; window.open(url+'/wp-admin'); })(); |
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 | |
// Do this so that the chapel_get_client_options WP_Query/get_posts ONLY happens | |
// when the field is run (otherwise this query will run on EVERY wordpress page-load, | |
// whether page has CMB2 fields or not) | |
public function chapel_get_client_options_cb() { | |
return chapel_get_client_options( array( 'post_type' => ' clients ', 'numberposts' => -1 , 'orderby' => 'name', 'order' => 'ASC' ) ); | |
} | |
function chapel_project_metaboxes() { |
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 | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
/** | |
* Grid of products. | |
* | |
* @author WooThemes | |
* @category Widgets |
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 | |
//dis like the best code ever | |
function register() { | |
$msg = ''; | |
if ( empty( $_POST ) ) { | |
return 'Fill out the form, dummy!'; | |
} |
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
#!/bin/bash | |
# | |
# Prints all hooks in a dir to a .log file. | |
# | |
# Permissions issues: | |
# run: chmod +x gethooks | |
# | |
# gist: https://gist.github.com/ramiabraham/e8356e00130351ddcbe2c62125e6c52a | |
# | |
# Easy usage: |
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 | |
function maybe_disable_cmb2_styles( $enabled ) { | |
if ( ! is_admin() ) { | |
$enabled = false; | |
} | |
return $enabled; | |
} | |
add_filter( 'cmb2_enqueue_css', 'maybe_disable_cmb2_styles' ); |
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 | |
$odd_or_even = 'even'; | |
$loop_2 = new WP_Query( 'cat=1&showposts=2&orderby=date&order=DESC' ); while ($loop_2->have_posts()) : $loop_2->the_post(); ?> | |
<div <?php post_class( $odd_or_even ); ?>> | |
<?php $odd_or_even = ( 'odd' == $odd_or_even ) ? 'even' : 'odd'; ?> | |
<div class="column-5 left"> | |
<a href="<?php the_permalink(); ?>" /><?php the_post_thumbnail( 'thumbnail', array( 'class' => 'featured-image' ) ); ?></a> | |
<a href="<?php the_permalink(); ?>" /><span class="read-more">Read More</span></a> |
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 | |
/** | |
* A class filled with functions that will never go away upon theme deactivation | |
* | |
* @package WordPress | |
* @subpackage GRD | |
* @version 0.1.0 | |
*/ | |
class GRD_Functions { |
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
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: #333; | |
cursor: default; | |
margin: 0; | |
padding: 0; |