Skip to content

Instantly share code, notes, and snippets.

View EnragedSuccubus's full-sized avatar

Nicole EnragedSuccubus

View GitHub Profile
@EnragedSuccubus
EnragedSuccubus / build-hollow-box-css3-eg01.html
Last active January 5, 2016 04:40
Build Hollow Box CSS3 EG 01
<div class="box center-center"></div>
@EnragedSuccubus
EnragedSuccubus / build-hollow-box-css3-eg-03.css
Created January 5, 2016 04:40
Build Hollow Box CSS3 EG 03
&:after {
content:'';
position:absolute;
top:50px;
left:50px;
width:100px;
height:100px;
background-color:#fff;
z-index:2;
}
@EnragedSuccubus
EnragedSuccubus / adding-custom-post-types-to-omnisearch-in-jetpack-eg-01.php
Created January 5, 2016 06:07
Adding Custom Post Types to Omnisearch in Jetpack
<?php
// Add our $post_type_name to Omnisearch!
if ( class_exists( 'Jetpack_Omnisearch_Posts' ) ) {
class CG_Post_Type_Omnisearch extends Jetpack_Omnisearch_Posts {
var $post_type = 'post-type-id-here';
}
new CG_Post_Type_Omnisearch;
}
?>
@EnragedSuccubus
EnragedSuccubus / custom-message-in-wp-admin-area-eg01.php
Last active January 5, 2016 06:22
Custom Message in WP-Admin EG 01
<?php
function geissinger_reading_warning_message() {
global $pagenow;
if ( $pagenow == 'options-reading.php' )
echo '<div class="error"><h3>WARNING! Do not adjust the "Front Page Displays" options! Your theme depends on these settings!.</h3></div>';
}
add_action( 'admin_notices', 'geissinger_reading_warning_message' );
@EnragedSuccubus
EnragedSuccubus / modify-breadcrumbs-in-canvas-from-woothemes.php
Last active January 5, 2016 06:34
Modify Breadcrumbs in Canvas EG 01
<?php
function my_custom_woo_breadcrumbs() {
}
?>
@EnragedSuccubus
EnragedSuccubus / modify-breadcrumbs-in-canvas-from-woothemes.php
Last active January 5, 2016 06:37
Modify Breadcrumps in Canvas EG 02
<?php
function my_custom_woo_breadcrumbs() {
}
add_filter('woo_breadcrumbs_args', 'my_custom_woo_breadcrumbs');
?>
<?php
function my_custom_woo_breadcrumbs($args) {
$defaults = array(
'separator' => '&raquo;',
'before' =>; '
);
return $defaults;
}
?>
@EnragedSuccubus
EnragedSuccubus / modify-breadcrumbs-in-canvas-from-woothemes.php
Last active January 5, 2016 06:40
Modify Breadcrumbs in Canvas EG 04
$defaults = array(
'separator' =>; '>;',
'before' =>; '<span class="breadcrumb-title">' . esc_html__( 'You are here:', 'woothemes' ) . '</span>',
'after' =>; false,
'front_page' =>; true,
'show_home' =>; esc_html__( 'Home', 'woothemes' ),
'echo' =>; true,
'show_posts_page' =>; true
);
@EnragedSuccubus
EnragedSuccubus / build-a-dynamic-sub-nav-for-child-pages.php
Last active January 5, 2016 07:01
Build a Dynamic Sub-nav for Child Pages EG 01
<?php
global $post;
if($post->post_parent) {
$parent_id = get_post_ancestors($post->ID);
$id = end($parent_id);
} else {
$id = $post->ID;
}
wp_list_pages('title_li=&child_of=' . $id);
@EnragedSuccubus
EnragedSuccubus / build-a-dynamic-sub-nav-for-child-pages.php
Created January 5, 2016 07:02
Build A Dynamic Sub-nav for Child Pages EG 02
global $post;