Skip to content

Instantly share code, notes, and snippets.

@koentjuh1
koentjuh1 / jQuery if window width is between.js
Created March 14, 2016 11:26
jQuery if window width is between
$(document).ready(function(){
if ( $(window).width() > 480 && $(window).width() < 768) {
} else{
}
});
@mattclements
mattclements / function.php
Last active April 16, 2024 17:04
Wordpress Disable Comments (add to function.php)
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}
@mdemrs
mdemrs / Remove Wordpress Version in footer
Last active July 10, 2017 17:19
wp: remove Wordpress version in footer
@mdemrs
mdemrs / remove or add Wordpress Footer Credits, Benjamin Denis
Created March 9, 2015 16:38
wp: remove or add Wordpress Footer Credits
@eduardozulian
eduardozulian / wp-taxonomy-dropdown.php
Last active May 5, 2024 14:45
Callback function for 'meta_box_cb' argument inside register_taxonomy() that replaces the regular checkboxes with a plain dropdown list
<?php
/**
* Callback function for taxonomy meta boxes
*
* A simple callback function for 'meta_box_cb' argument
* inside register_taxonomy() that replaces the regular
* checkboxes with a plain dropdown list
*
* @param [type] $post [description]
* @param [type] $box [description]
@calliaweb
calliaweb / display-advanced-custom-fields-gallery-as-an-envira-gallery.php
Last active November 11, 2020 18:44
Display Advanced Custom Fields Gallery as an Envira Gallery
@irazasyed
irazasyed / How-To Install Memcache on CentOS WHM-cPanel.md
Last active November 15, 2023 14:28
How-To: Install Memcache on CentOS (WHM/cPanel)

How-To: Install Memcache on CentOS (WHM/cPanel)

Without wasting much time, Let us get started!

Follow these simple instructions:

  • Step 1: Login into your WHM panel and using easyapache enable Memcache

  • Step 2: SSH into your server and fire this command yum install memcached.x86_64 php-pecl-memcache.x86_64