This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('body').on('click', '.leaflet-popup-content > div > a:first', function(e) { | |
e.preventDefault(); | |
var t = jQuery(this); | |
var str = t.text(); | |
//alert(tText); | |
var newStr = str.replace(" - Full Details", ""); | |
var urlstr = 'https://www.google.com/search?q=site:campendium.com '; | |
urlstr = urlstr + newStr; | |
window.open(urlstr); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Twitter @username to Jetpack Sharing | |
// from http://wpspeak.com/adding-twitter-handle/ | |
function custom_add_twitterhandle_via() { | |
return 'username'; | |
} | |
add_filter ( 'jetpack_sharing_twitter_via', 'custom_add_twitterhandle_via' ); | |
// This function adds a colon after the title of the twitter share | |
function custom_sharing_title() { | |
$post = get_post(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This is a widget for Homepage Widgets | |
// initializes the widget on WordPress Load | |
add_action('widgets_init', 'homepage_widget_init_widget'); | |
// Should be called above from "add_action" | |
function homepage_widget_init_widget() { | |
register_widget( 'HomepageWidget' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_new_posts_filter($query) { | |
// in place of "press" put your custom post type -- you can add additional post types by duplicating the if block. | |
// you can also add more query variables such as 'order'. This is extremely useful | |
// the is_main_query makes sure you don't indiscriminantly filter secondary loops as well. | |
if ( !is_admin() && is_post_type_archive('book') && $query->is_main_query() ) { | |
$query->set( 'posts_per_page', '20' ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.triangleFold(@size, @basebackground, @foldcolor) { | |
&:after { | |
content: ''; | |
width: 0; | |
height: 0; | |
border-left: @size solid transparent; | |
border-right: 0px solid transparent; | |
border-bottom: @size solid @basebackground; | |
position: absolute; | |
bottom: 0px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function otg_optional_search_filter($query) { | |
$post_type = $_GET['type']; | |
if (!$post_type) { | |
$post_type = 'any'; | |
} | |
if ($query->is_search) { | |
$query->set('post_type', $post_type); | |
}; | |
return $query; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<div class="container blog content"> | |
<div class="row"> | |
<div class="span8 entry"> | |
<div class="headline"> | |
<?php | |
$value = get_query_var($wp_query->query_vars['taxonomy']); | |
$cat = get_term_by('slug',$value,$wp_query->query_vars['taxonomy']); ?> | |
<h1><?php echo $cat->name; ?></h1> | |
<?php $loop = new WP_Query(array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Excerpt Filter this will remove any text added to the excerpt | |
function new_excerpt_more($more) { | |
global $post; | |
return ''; | |
} | |
// This will append the excerpt with additional text, "Read More" | |
function the_excerpt_always_show_read_more($content) { | |
global $post; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// [page name="contact"] | |
function page_content($atts) { | |
extract(shortcode_atts(array( | |
'name' => '' | |
), $atts)); | |
$return = ''; | |
$args=array( | |
'name' => $name, | |
'post_type' => 'page', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function append_query_string($url) { | |
global $post; | |
$newurl = get_post_meta($post->ID, 'post_URL', true); | |
if ($newurl) { | |
$url = $newurl; | |
} | |
return $url; | |
} | |
add_filter('post_link', 'append_query_string'); |
NewerOlder