Skip to content

Instantly share code, notes, and snippets.

View cliffordp's full-sized avatar

Clifford cliffordp

View GitHub Profile
@cliffordp
cliffordp / q10.css
Last active August 26, 2015 20:19
q10 event list print styling for Twenty Fifteen theme
<style type="text/css" media="print">
.events-list.events-archive .tribe-events-list-event-description,
.events-list.events-archive #tribe-events-bar,
.events-list.events-archive #tribe-events-footer,
.events-list.events-archive a.tribe-events-button,
.events-list.events-archive header,
.events-list.events-archive footer {
display: none !important;
}
.events-list.events-archive .tribe-events-list .type-tribe_events {
@cliffordp
cliffordp / single-event-website-link-rel-nofollow.php
Created August 26, 2015 22:21
q7 --> add rel="nofollow" to a single event's "EVENT WEBSITE" -> "URL:" link
@cliffordp
cliffordp / ccnomarginshadow.less
Created February 21, 2014 23:54
Cool Carousel Section - Remove margin and shadow
.ccnomarginshadow {
.cc-wrapper{
margin:0 auto 0px;
.cc-viewport{
.box-shadow(0 0 0 #fff);
border:none;
left:0px;
}
}
}
@cliffordp
cliffordp / font-awesome-icons-for-quotes.less
Created March 6, 2014 17:24
Overriding PageLines DMS styles for blockquotes and Font Awesome icons for blockquotes
// Font Awesome icons before and after quotes
q:before,
blockquote:before {
font-family: PageLinesFont;
content: @fa-var-quote-left; //works in DMS v2
//content:"\f10d"; //works in DMS prior to v2
color: @textColorAlt;
}
q:after,
blockquote:after {
@cliffordp
cliffordp / style.less
Created April 5, 2014 14:41
Override display of DMS 2 non-legacy PostLoop: hide .metahead and center featured images
#site .pl-new-loop {
.metahead { //author info
display:none;
}
.hentry {
&.post,
&.multi-post {
padding-left: 0px; //override 100px since hiding .metahead
}
.metamedia { //featured images on archive and single post displays
@cliffordp
cliffordp / dms-makestuffinsidefullwidth.less
Created April 24, 2014 18:43
Change content-width sections inside a DMS Canvas Area to full-width -- http://www.pagelinestheme.com/make-content-width-section-full-width/
// from http://www.pagelinestheme.com/make-content-width-section-full-width/
// overriding dms/dms/less/pl-structure.less
body.display-boxed #site .boxed-wrap .pl-area.makestuffinsidefullwidth .pl-area-wrap > .pl-content {
padding-left: 0px;
padding-right: 0px;
}
body.display-full #site .pl-area.makestuffinsidefullwidth .pl-content {
max-width: none;
}
@cliffordp
cliffordp / functions.php
Created May 3, 2014 13:24
Replace 'PageLines-' prefix for DMS Editor media uploads (from editor/editor.actions.php)
<?php
//from http://www.pagelinestheme.com/remove-customize-dms-editors-media-uploads-prefix/
//replace 'PageLines-' prefix for DMS Editor media uploads (from editor/editor.actions.php)
add_filter( 'pl_up_image_prefix', 'my_pl_upload_prefix');
function my_pl_upload_prefix(){
return ''; //example result: 'filename.png'
//return 'My Keyword - '; //example result: 'My Keyword - filename.jpg'
//return get_bloginfo('name','raw') . ' - '; //example result: 'Site Name - filename.gif'
}
@cliffordp
cliffordp / functions.php
Created May 3, 2014 14:03
Remove display of Karma Counter in DMS 2
<?php
//from http://www.pagelinestheme.com/removing-dms-2-karma-counter/
//remove display of Karma Counter in DMS 2
remove_shortcode( 'pl_karma' );
add_shortcode( 'pl_karma', '__return_false' );
@cliffordp
cliffordp / functions.php
Created May 13, 2014 20:10
Display trackbacks and pingbacks in DMS 2
<?php
// from http://www.pagelinestheme.com/dms-trackbacks-pingbacks/ -- https://github.com/pagelines/DMS/issues/741#issuecomment-42981582
// http://codex.wordpress.org/Function_Reference/wp_list_comments
add_filter( 'pl_list_comments', function() { return array( 'type' => 'all', 'avatar_size' => '60' ); } );
@cliffordp
cliffordp / functions.php
Last active August 29, 2015 14:10
Adding custom SmugMug domain to oEmbed whitelist in WordPress (full regex version)
<?php
// From http://tourkick.com/2014/smugmug-custom-domain-oembed-wordpress/
// This version is based on the SmugMug code from wp-includes/class-oembed.php
// Even if you set both WWW and non-WWW versions as CNAMEs in your DNS settings, an oEmbed attempt to the wrong custom SmugMug domain (e.g. WWW if the custom domain in your SmugMug settings is non-WWW) will not work, which is why (www\.)? is not in the regex
// for a custom SmugMug subdomain like http://media.mydomain.com (notice the "backslash-dot" after the subdomain)
wp_oembed_add_provider( '#https?://?media\.mydomain\.com/.*#i', 'http://api.smugmug.com/services/oembed/', true );
// for a custom SmugMug domain like http://mydomain.com: