Skip to content

Instantly share code, notes, and snippets.

View brettredvers's full-sized avatar

Brett Redvers brettredvers

View GitHub Profile
@brettredvers
brettredvers / functions.php
Last active January 29, 2018 13:54 — forked from unfulvio/functions.php
FacetWP - WooCommerce Memberships fix
<?php
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) {
if ( 'wc_user_membership' == $query->get( 'post_type' ) ) {
$is_main_query = false;
}
return $is_main_query;
}, 10, 2 );
@generatepress
generatepress / gist:cdb67600504b71169c285c9d1788d5d7
Last active August 27, 2017 00:26
Show Gridable Add Row button in Sections
add_action( 'admin_head', 'tu_show_gridable_button_sections' );
function tu_show_gridable_button_sections() {
?>
<style>
#wp-generate-sections-editor-wrap .wp-media-buttons > .gridable-insert-row-button {
display: inline-block;
}
</style>
<?php
}