Skip to content

Instantly share code, notes, and snippets.

Sam C. samjco

Block or report user

Report or block samjco

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
samjco / cpt_in_wp_submenu.php
Created Jan 5, 2018 — forked from johnregan3/cpt_in_wp_submenu.php
Add Custom Post Type to WordPress Plugin Submenu (Hack)
View cpt_in_wp_submenu.php
Plugin Name: Nerfherder Plugin
Plugin URI:
Description: Demonstration of how to add Custom Post Types to Submenu Items
Author: John Regan
Author URI:
Version: 1.0
View gist:a114e090a211355b2dcbc6195bda0eed
/* Author: Scott Bolinger
* Author URI:
* Styling for Display Posts Shortcode plugin for use with the AppTheme. Add this code to a child theme style.css file.
* Plugin information:
ul.display-posts-listing {
list-style-type: none;
samjco / redirect-subscriber.php
Created Apr 24, 2016 — forked from kcpt-steven-kohlmeyer/redirect-subscriber.php
Wordpress: Redirect subscribers from accessing admin.
View redirect-subscriber.php
global $current_user; // Use global
get_currentuserinfo(); // Make sure global is set, if not set it.
if ( user_can( $current_user, "subscriber" ) ) {
// Disable admin bar for subscribers
You can’t perform that action at this time.