Skip to content

Instantly share code, notes, and snippets.

View Pross's full-sized avatar
💬

Simon Prosser Pross

💬
View GitHub Profile
@Pross
Pross / gist:5225703
Created March 23, 2013 00:07
modal test
You need to <a data-toggle="modal" role="button" href="#modal_1019057629">Click Here</a> if you want the modal to show up.
<div id="modal_1019057629" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-header"><a class="close" data-dismiss="modal" aria-hidden="true">×</a><h3>Title</h3></div><div class="modal-body"><p> Some content here for the cool modal pop up. Labels, badges, and buttons can open them! </p></div><div class="modal-footer"><a href="#" class="btn btn-" data-dismiss="modal" aria-hidden="true">Close</a></div></div>
.caret {
display: none;
}
.dropdown-menu a {
color: #fff !important;
}
.dropdown-menu {
background-color: #000000 !important;
}
add_action( 'wp_enqueue_scripts', 'deregister_pl_bootstrap' );
function deregister_pl_bootstrap() {
// some logic needs to check if your in the forums!!
wp_deregister_script( 'pagelines-bootstrap-all' );
}
@Pross
Pross / functions.php
Last active December 15, 2015 23:09
hide carousel for ie8 on a page.
add_action( 'template_redirect', 'carousel_ie8' );
function carousel_ie8() {
$page = 96; // <=== YOU MUST SET THE PAGE ID HERE
global $post;
if( ! is_object( $post ) || $page != $post->ID )
return;
function cmp_by_position($a, $b) {
if( isset( $a['pos'] ) && is_int( $a['pos'] ) && isset( $b['pos'] ) && is_int( $b['pos'] ) )
return $a['pos'] - $b['pos'];
else
return 0;
}
@Pross
Pross / functions.php
Created April 9, 2013 18:39
tag filter to change html
add_filter( 'the_tags', 'my_tag_filter', 10, 1 );
function my_tag_filter( $html ) {
$html = str_replace( 'Tagged with &rarr;', 'Some Tags: ', $html );
$html = str_replace( ' &bull; ', ' | ', $html );
return $html;
}
@Pross
Pross / library.options.php
Created April 10, 2013 00:30
possible import fix.
<?php
/**
* PageLines Option
*
* Uses controls to find and retrieve the appropriate option value
*
* @package PageLines Framework
*
* @since ...
$banner_media = '<img src="'.plmeta('the_banner_image', $oset).'" alt="' . esc_attr( get_the_title( $oset['post_id'] ) ) . '" />';
function my_exclude_category( $query ) {
if ( $query->is_home ) {
$query->set( 'cat', '-1,-3' );
}
}
add_action( 'pre_get_posts', 'my_exclude_category' );