Skip to content

Instantly share code, notes, and snippets.

View reinnovating's full-sized avatar

Joi reinnovating

View GitHub Profile
@reinnovating
reinnovating / functions.php
Created January 16, 2016 01:04
Add overlay images for new and sold out products on the product list pages in WooCommerce.
<?php
class shopTheme {
public function __construct () {
/* Add overlay images for products in shop list */
add_action('woocommerce_before_shop_loop_item_title', array($this , 'add_overlay_images'), 10);
}
/* Add overlay images for products in shop list*/
public function add_overlay_images(){
@reinnovating
reinnovating / function.php
Last active November 15, 2017 09:34 — forked from mattclements/function.php
Wordpress Disable Comments (add to function.php)
<?php
// Add to existing function.php file
// Disable support for comments and trackbacks in post types
function df_disable_comments_post_types_support() {
$post_types = get_post_types();
foreach ($post_types as $post_type) {
if(post_type_supports($post_type, 'comments')) {
remove_post_type_support($post_type, 'comments');
@reinnovating
reinnovating / hide_admin_bar.php
Created November 16, 2017 20:27 — forked from franz-josef-kaiser/hide_admin_bar.php
Hide the admin bar with the click of a button in the WP admin UI
<?php
/**
* Plugin Name: "Hide Admin Bar"-Button
* Plugin URI: http://unserkaiser.com
* Description: Easier debugging when the error message is hidden behind the admin bar.
* Version: 0.1
* Author: Franz Josef Kaiser
* Author URI: http://unserkaiser.com
*/
// Prevent loading this file directly - Busted!