This file contains hidden or 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 | |
/** | |
* Hide the "Edit Page" link in the admin bar on the front end for pages built with Beaver Builder. | |
*/ | |
function remove_beaver_builder_edit_link() { | |
// Only run on the front end and for logged-in users. | |
if ( is_admin() || ! is_user_logged_in() ) { | |
return; | |
} |
This file contains hidden or 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 hidden or 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 hidden or 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 return_season() { | |
$day = date('z'); | |
if( $day < 79) $season = 'winter'; | |
elseif( $day < 171) $season = 'spring'; | |
elseif( $day < 265) $season = 'summer'; | |
elseif( $day < 354) $season = 'fall'; | |
else $season = "winter"; | |
return $season; |
This file contains hidden or 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_login_logo() { | |
// this will add a block fo css to the page that you can customize on the login page. | |
?> | |
<style type="text/css"> | |
body.login div#login h1 a { | |
background-image: url(<?php echo get_bloginfo( 'stylesheet_directory' ) ?>/images/login_logo.png); | |
padding-bottom: 3px; | |
background-size: contain; | |
width: 100%; |
This file contains hidden or 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 | |
// add these lines to your functions file | |
add_filter( 'embed_oembed_html', 'embed_responsively_oembed_filter', 10, 4 ) ; | |
// the following function will wrap the embedded code in a responsive frame, where the video is 100% width | |
function embed_responsively_oembed_filter($html, $url, $attr, $post_ID) { | |
$return = "<style> | |
.embed-container { | |
position: relative; |
This file contains hidden or 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
RewriteEngine On | |
RewriteBase /wp-content/uploads/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{HTTP_HOST} ^tempurl.com$ | |
RewriteRule ^(.+)$ http://siteurl.com/wp-content/uploads/$1 [L,R=301,NE] |
This file contains hidden or 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 ?> | |
<div class="member-login"> | |
<?php if (is_user_logged_in()): | |
$loggedin = true; | |
$user = wp_get_current_user(); | |
$levels = WLMAPI::GetUserLevels($user->ID); | |
$getlevels = WLMAPI::GetLevels(); | |
endif; ?> | |
<a class="button" href="javascript:void(null);" onclick="jQuery('.dropdown-box').toggle();"> | |
<?php if ($loggedin): ?> |
This file contains hidden or 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' ); | |
} |
NewerOlder