Skip to content

Instantly share code, notes, and snippets.

Mark Wilkinson wpmark

Block or report user

Report or block wpmark

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
View wpmark-page-children-shortcode.php
Plugin Name: wpamrk Page Children Shortcode
Plugin URI:
Description: A shortcode that outputs the current pages children either with or without their featured image.
Version: 0.1
Author: Mark Wilkinson
Author URI: http://
wpmark / gist:9069976
Created Feb 18, 2014
Change Whistles WordPress Plugin Post Type Labels
View gist:9069976
* Function pxlcore_whistles_post_labels()
* Changes the post labels for the Whistles post type.
function pxlcore_whistles_post_labels( $labels ) {
$labels->name = 'Snippets';
$labels->singular_name = 'Snippet';
$labels->menu_name = 'Snippets';
wpmark / gist:9076729
Created Feb 18, 2014
List Children Shortcode Example
View gist:9076729
[wpmark_list_children images="true"]
View show-admin-display-hooks.php
Plugin Name: Show Admin Display Hooks
Plugin URI:
Description: Make visible all the hooks in the WordPress admin area that are available for outputting content on different admin screens.
Version: 0.1
Author: Mark Wilkinson
Author URI:
License: GPLv2 or later
View widget-starter.php
* Class sensl_whistles_widget
* Builds the widget for adding post content to widgetized area extending WP_Widget
class MDW_Widget extends WP_Widget {
function mdw_widget() {
$widget_ops = array(
wpmark / wp-tag-cloud-args.php
Created Jun 22, 2014
Filter the Output of WordPress Tag Cloud Widget
View wp-tag-cloud-args.php
function wpmark_widget_tag_cloud_args( $args ) {
$args[ 'smallest' ] = '1.5';
$args[ 'largest' ] = '1.5';
$args[ 'unit' ] = 'em';
return $args;
wpmark / null-instagram-widget-output.php
Last active Aug 29, 2015
Null Instagram Widget Output in Template File
View null-instagram-widget-output.php
/* output instagram widget */
'username' => 'username',
'title' => '',
'number' => '1',
'size' => 'large',
'target' => '_blank',
wpmark / registered_post_type.php
Created Sep 23, 2014
Alter the Registered Post Type Args for Any Post Type
View registered_post_type.php
* Function bct_make_whistles_public()
* Sets the whistles post type to be public
function bct_make_whistles_public( $post_type, $args ) {
/* only proceed for the whistles post type */
if ( 'whistle' != $post_type )
wpmark / gist:292d91a50c6c9bafa009
Created Sep 23, 2014
Registered Post Type Args
View gist:292d91a50c6c9bafa009
object(stdClass)#386 (26) {
object(stdClass)#373 (14) {
string(8) "Whistles"
string(7) "Whistle"
string(7) "Add New"
wpmark / gist:aa388261d0ef58938218
Last active Aug 29, 2015
Show Only 5 Blog Posts on Home Page
View gist:aa388261d0ef58938218
* Function wpmark_alter_homepage_posts_query()
* Alter query on homepage for show just 5 posts
function wpmark_alter_homepage_posts_query( $query ) {
/* check this is not the main query, the admin - if so bail early */
if( ! $query->is_main_query() || is_admin() )
You can’t perform that action at this time.