Skip to content

Instantly share code, notes, and snippets.

Cadoo cadoo

View GitHub Profile
View linkedin.hbs
<a class="inline-block hop5 px1" href="https://www.linkedin.com/shareArticle?mini=true&url={{url absolute="true"}}&title={{encode title}}" onclick="window.open(this.href, 'linkedin-share', 'width=520,height=570');return false;">
<img class="align-middle" src="{{asset 'images/linkedin.svg'}}" alt="LinkedIn icon">
<span class="hide">LinkedIn</span>
</a>
@cadoo
cadoo / wordpress-search-filter.php
Last active Dec 21, 2016
WordPress search results types filter
View wordpress-search-filter.php
/**
* Filter search results types
*/
function filter_search_types( $query ) {
if ( $query->is_search ) {
$query->set( 'post_type', array( 'post', 'alarm', 'store' ) );
}
return $query;
}
add_filter( 'pre_get_posts', 'filter_search_types' );
View style-test.md

Below is just about everything you'll need to style in the theme. Check the source code to see the many embedded elements within paragraphs.


Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
@cadoo
cadoo / custom-css.html
Created Aug 26, 2016
custom-css-paperleaf
View custom-css.html
<link rel="stylesheet" type="text/css" href="{{asset "css/dist/custom.css"}}" />
View title-hide.css
.hentry--masonry .entry-title,
.featured-post-title {
display: none;
}
View functions.php
<?php
// Load parent theme styles
function sb_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'parent-style' ) );
}
add_action( 'wp_enqueue_scripts', 'sb_enqueue_styles', 100 );
View wp-required.css
/*--------------------------------------------------------------
## Captions
--------------------------------------------------------------*/
.wp-caption {
margin-bottom: 1.5em;
max-width: 100%;
}
.wp-caption img[class*="wp-image-"] {
display: block;
View text-widget-footer.html
@cadoo
cadoo / title-shadow.css
Created Nov 10, 2015
Remove shadow from title
View title-shadow.css
.site-title {
text-shadow: none;
}
@cadoo
cadoo / category-title-remove.php
Last active Nov 10, 2015
Remove "Category:" from category titles
View category-title-remove.php
add_filter( 'get_the_archive_title', function ( $title ) {
if( is_category() ) {
$title = single_cat_title( '', false );
}
return $title;
You can’t perform that action at this time.