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
//* Deregister CSS from Events Manager & Buddypress Docs Plugins | |
//* http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles | |
add_action( 'wp_print_styles', 'my_deregister_styles', 100 ); | |
function my_deregister_styles() { | |
wp_deregister_style( 'events-manager' ); | |
wp_deregister_style( 'bp-docs-css' ); | |
} |
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
//////* BBPRESS *////// | |
/** Developped locally CAUTION !!! DELETE THIS BEFORE PRODUCTION */ | |
add_filter( 'bbp_verify_nonce_request_url', 'my_bbp_verify_nonce_request_url', 999, 1 ); | |
function my_bbp_verify_nonce_request_url( $requested_url ) | |
{ | |
return 'http://localhost:8888' . $_SERVER['REQUEST_URI']; | |
} | |
/** Force full width layout on forums posts only*/ |
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
echo '<p>' . wp_trim_words( get_the_excerpt(), 25 ) . '</p>'; | |
/** | |
* Grid Content | |
* Change the number of words in excerpt if in the grid loop | |
*/ | |
function gst_grid_content() { | |
// First, we make sure we're in the grid loop. | |
if( ! apply_filters( 'is_genesis_grid_loop', false ) ) |
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
/** | |
* Default Category Title | |
* | |
* @author Bill Erickson | |
* @url http://www.billerickson.net/default-category-and-tag-titles | |
* | |
* @param string $headline | |
* @param object $term | |
* @return string $headline | |
*/ |
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 | |
/* | |
Template Name: Documents | |
*/ | |
//* Remove Genesis Loop and Add Custom Loop Instead | |
remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); | |
add_action( 'genesis_entry_content', 'fcu_do_custom_loop' ); | |
/** |
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: Jobs CPT | |
Plugin URI: http://yourwebsite.com/ | |
Description: Add Jobs CPT with taxonomy. Custom fields built with Beans Framework. | |
Version: 1.0 | |
Author: You. | |
Author URI: http://yoururl.com/ | |
License: GPLv2 | |
*/ |
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 | |
$args = array( | |
'post_type' => array( 'post' ), | |
'post_status' => array( 'publish' ), | |
'posts_per_page' => 100, // don't use -1, pick something reasonable | |
'no_found_rows' => true, // useful when pagination is not needed. | |
'update_post_meta_cache' => false, // useful when post meta will not be utilized. | |
'update_post_term_cache' => false, // useful when taxonomy terms will not be utilized. | |
// 'fields' => 'ids' // only good if all you need is ids |
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 not include the opening php tag if it is already included in your file. | |
//* Show Excerpt or Troncate Posts Content | |
add_filter( 'the_content', 'sps_troncate_post_content' ); | |
function sps_troncate_post_content( $content ){ | |
if ( !is_singular() ) |
OlderNewer