Skip to content

Instantly share code, notes, and snippets.

@remkus
remkus / functions.php
Created June 5, 2012 18:41 — forked from gregrickaby/functions.php
Custom Post-Info with Google Rich Snippet support
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
add_action( 'genesis_before_post_content', 'child_post_info' );
/**
* Custom Post-Info with Google Rich Snippet support
*
* @author Greg Rickaby
* @since 1.0.0
*/
function child_post_info() {
if ( is_page() )
@remkus
remkus / gist:2941390
Created June 16, 2012 13:55
Add WordPress' thickbox
<?php
add_action( 'init','fsm_thickbox' );
/**
* fsm_thickbox function.
*
* @access public
* @param mixed $text
* @return void
@remkus
remkus / gist:2947461
Created June 18, 2012 08:20
Change author link in Genesis Post Info
<?php
add_filter( 'genesis_post_info', 'custom_post_info_filter' );
/**
* Modify author link in Post Info to website.
*
* @access public
* @author Remkus de Vries
* @link http://remkusdevries.com/change-author-link/
* @param mixed $post_info
@remkus
remkus / gist:3827005
Created October 3, 2012 13:50
Add category to bodyclass
<?php
add_filter( 'body_class', 'fst_category_id_class' );
/**
* This function add the category name to the bodyclass.
*
* @access public
* @author Remkus de Vries
* @param mixed $classes
* @return void
@remkus
remkus / deploy.sh
Created October 4, 2012 17:44 — forked from BFTrick/deploy.sh
WordPress Plugin Deploy Script
#! /bin/bash
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo.
# main config
PLUGINSLUG="______your-plugin-name______"
CURRENTDIR=`pwd`
MAINFILE="______your-plugin-name______.php" # this should be the name of your main php file in the wordpress plugin
# git config
@remkus
remkus / gist:3851741
Created October 8, 2012 09:51
Function to add category nicenames to body class
<?php
add_filter( 'body_class', 'tax_body_class' );
/**
* This function adds category nicenames to body class.
*
* @access public
* @author Remkus de Vries
* @param mixed $classes
* @return void
@remkus
remkus / no-wp-admin.php
Created October 14, 2012 12:18
No WordPress Dashboard Access
add_action( 'init', 'no_wp_admin_for_lesser_gods' );
/**
* This will redirect anyone without an administrator
* lever user to the front of the site. No Dashboard for them.
*
* @author Remkus de Vries
* @access public
*
*/
function no_wp_admin_for_lesser_gods() {
@remkus
remkus / remove-jetpack-menu.php
Created December 6, 2012 22:08
Remove Jetpack menu for lesser gods
add_action( 'admin_menu', 'fst_remove_jetpack_page', 999 );
function fst_remove_jetpack_page( ) {
if ( class_exists( 'Jetpack' ) && !current_user_can( 'manage_options' ) ) {
remove_menu_page( 'jetpack' );
}
}
@remkus
remkus / wp-config-snippet.php
Created December 7, 2012 13:17
wp-config.php & local-config.php & PressUp Box
<?php
if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) {
include( dirname( __FILE__ ) . '/local-config.php' );
define( 'WP_LOCAL_DEV', true );
} else {
define( 'DB_NAME', $_SERVER["DB_NAME"] );
define( 'DB_USER', $_SERVER["DB_USER"] );
define( 'DB_PASSWORD', $_SERVER["DB_PASSWORD"] );
define( 'DB_HOST', 'localhost' );
@remkus
remkus / change_genesis_menu_settings.php
Last active July 26, 2021 09:18
Change the Genesis Theme Menu Settings
<?php
add_filter( 'genesis_theme_settings_menu_ops', 'fsm_change_genesis_theme_menu' );
/**
* Change Genesis Dashboard Menu Settings
* @param object $menu_ops Menu arguments object
* @return object $menu_ops Ammended menu arguments object
* @author Remkus de Vries
* @link https://gist.github.com/defries/4296462
*