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. | |
// 'ignore_sticky_posts' => true, // ignore sticky posts |
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 | |
// Exit if accessed directly | |
defined( 'ABSPATH' ) || exit; | |
/** | |
* This will only get the displayed group's menu items | |
* 1/ if a group is displayed | |
* 2/ if the theme is containing the template 'buddypress/groups/single/home.php' | |
* 3/ if the theme's template replaced <ul><?php bp_get_options_nav();?></ul> by <?php bp_nav_menu();?> | |
*/ |
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 copy the above php tag | |
// Stop JetPacks Minified/Concatention CSS file | |
add_filter( 'jetpack_implode_frontend_css', '__return_false' ); | |
//Remove JepPack CSS | |
function themeprefix_remove_jetpack_css() { | |
wp_deregister_style( 'AtD_style' ); // After the Deadline | |
wp_deregister_style( 'jetpack_likes' ); // Likes |
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
/********************* | |
* Sensei Integration | |
*********************/ | |
/** | |
* Declare that your theme now supports Sensei | |
*/ | |
add_action( 'after_setup_theme', 'sensei_support' ); | |
function sensei_support() { | |
add_theme_support( 'sensei' ); |
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($){ | |
$(document).ready(function(){ | |
$(".cmb_option#event_all_day").bind("change",function(){ | |
if ( $(this).is(':checked') ) { | |
$("#event_end_time").hide(); | |
$("#event_start_time").hide(); | |
if( $("#event_start_time").val() == '' ) { | |
$("#event_start_time").val("12:01 AM"); | |
} |
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 | |
/** | |
* Smarter version of the buddypress sitewide notices widget | |
* | |
* Fetches the notices in an output buffer and does not display widget when | |
* there is no content to display. | |
* | |
* Sadly this widget is necessary because buddypress only finds out if there | |
* are notices to be displayed while displaying them. | |
* |
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 | |
/** | |
* Modify query to remove a post type from search results, but keep all others | |
* | |
* @author Joshua David Nelson, josh@joshuadnelson.com | |
* @license http://www.gnu.org/licenses/gpl-2.0.html GPLv2+ | |
*/ | |
add_action( 'pre_get_posts', 'jdn_modify_query' ); | |
function jdn_modify_query( $query ) { | |
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 | |
//* Add class to .site-container | |
add_filter('genesis_attr_site-container', 'jive_attributes_st_container'); | |
function jive_attributes_st_container($attributes) { | |
$attributes['class'] .= ' st-container'; | |
return $attributes; | |
} | |
//* Add class to .site-inner |
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 you are using BP 2.1+, this will insert a Country selectbox. | |
* Add the function to bp-custom.php and then visit .../wp-admin/users.php?page=bp-profile-setup | |
*/ | |
function bp_add_custom_country_list() { | |
if ( !xprofile_get_field_id_from_name('Country') && 'bp-profile-setup' == $_GET['page'] ) { | |
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 ( ! class_exists( 'Imath_Auto_Join_Groups' ) ) : | |
/** | |
* AutoJoin new members to chosen groups | |
* | |
* This is a little snippet, feel free to : | |
* - use it | |
* - extend it.. |
NewerOlder