Skip to content

Instantly share code, notes, and snippets.

View MatRouault's full-sized avatar
🏠
Working from home

Mathieu MatRouault

🏠
Working from home
View GitHub Profile
@joshuadavidnelson
joshuadavidnelson / event-admin.js
Created February 19, 2015 21:02
All day toggle for BE Events Calendar with CMB
(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");
}
@woogist
woogist / genesis-functions.php
Last active December 20, 2017 01:51
The code in below will integrate Sensei with the Genesis theme framework from Studio Press. Add the code below into your themes functions.php file.
/*********************
* Sensei Integration
*********************/
/**
* Declare that your theme now supports Sensei
*/
add_action( 'after_setup_theme', 'sensei_support' );
function sensei_support() {
add_theme_support( 'sensei' );
@neilgee
neilgee / jetpack-all-modules.php
Last active May 5, 2019 13:08
Remove JetPack CSS
<?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
<?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();?>
*/
@joshuadavidnelson
joshuadavidnelson / basic-wp-query.php
Last active August 11, 2019 06:27
Basic WP Query
<?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