Skip to content

Instantly share code, notes, and snippets.

View akumaf's full-sized avatar

Friso Kluitenberg akumaf

  • The Netherlands
View GitHub Profile
@akumaf
akumaf / responsive-gists.scss
Last active February 10, 2019 03:10
See http://arevico.com/make-github-gists-more-responsive for information on how to use this gist
/**
* The following code will make a github embedded gists reponsive
* The gist will be 100% in width width, and scroll if a line is to long
* if you want wrapping, uncomment the wrapping section
* Do note that identation may be butcherd tough
*/
.gist{
width:100%;
<?php
/**
* Remove or change a duplicate submenu in WordPress
*
* @author H.F. Kluitenberg
*
* See http://arevico.com/remove-duplicate-sub-menu-in-wordpress on how to use this script
*/
add_action('admin_init', 'nameSubMenu') ;
<?php
/**
* This code is intended for both theme developers and webmasters. It allows you to specify a page template
* for any post belonging to a specific category.
*
* The script looks for a file called in-category-{$slug} and if it exists and uses that file as a template. Replace {$slug] with
* the friendly name of the category (slug)
*
* @author H.F. Kluitenberg < http://arevico.com/ >
* @usage See http://arevico.com/change-the-template-for-all-posts-in-a-specific-category/
<?php
/**
* Fast and Efficient Way to Include Template abilities for posts and custom post types
*
* Author H.F. Kluitenberg < Arevico.com >
* How to use:
* See: http://arevico.com/templates-for-custom-post-types-and-posts/
*/
class ArevicoTheme
{
<?php
/**
* It's possible to modify WordPress insert queries in such a way to ignore duplicates.
* Ignoring in this context means that no error is thrown and the insert is skipped.
* This can be useful in conjunction with unique keys. When the filter is active, all
* calls to $wpdb->insert() are transformed to insert-ignore queries
*
* Be mindful when running this code in a plugin that you remove the filter when you are done.
* It's not nice to edit other people's queries when not necessary.