Skip to content

Instantly share code, notes, and snippets.

Avatar

Joi reinnovating

View GitHub Profile
@reinnovating
reinnovating / hide_admin_bar.php
Created Nov 16, 2017 — forked from franz-josef-kaiser/hide_admin_bar.php
Hide the admin bar with the click of a button in the WP admin UI
View hide_admin_bar.php
<?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!
@reinnovating
reinnovating / function.php
Last active Nov 15, 2017 — forked from mattclements/function.php
Wordpress Disable Comments (add to function.php)
View 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 / functions.php
Created Jan 16, 2016
Add overlay images for new and sold out products on the product list pages in WooCommerce.
View functions.php
<?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(){
You can’t perform that action at this time.