Skip to content

Instantly share code, notes, and snippets.


Julian Rosser jjbbrr

  • London
View GitHub Profile
JiveDig / remove-tinymce-editor-buttons.php
Last active Sep 15, 2020
Remove buttons/items from the WordPress TinyMCE editor
View remove-tinymce-editor-buttons.php
* Removes buttons from the first row of the tiny mce editor
* @link
* @param array $buttons The default array of buttons
* @return array The updated array of buttons that exludes some items
add_filter( 'mce_buttons', 'jivedig_remove_tiny_mce_buttons_from_editor');
mizner / wp-query-posts-per-page-by-category.php
Created Apr 18, 2016
WP Query posts per page by category
View wp-query-posts-per-page-by-category.php
$the_query = new WP_Query(array(
'category_name' => 'featured',
'posts_per_page' => '3'
while ($the_query->have_posts()) : $the_query->the_post(); ?>
<div class="post-container">
<?php the_post_thumbnail( 'medium' ) ?>
<h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
<p><?php the_excerpt(); ?></p>
maxrice / wc-hide-coupons-cart-checkout.php
Created Jan 21, 2014
WooCommerce - hide the coupon form on the cart or checkout page, but leave coupons enabled for use with plugins like Smart Coupons and URL Coupons
View wc-hide-coupons-cart-checkout.php
// hide coupon field on cart page
function hide_coupon_field_on_cart( $enabled ) {
if ( is_cart() ) {
$enabled = false;
return $enabled;