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
#header.info{display: none !important;} |
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
function author_highlight() { | |
global $comment; | |
if ($comment->user_id == get_the_author_meta('ID')) { echo "highlighted"; } | |
} |
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
function display_latest_tweets( | |
$twitter_user_id = 'justinwhall', | |
$cache_file = 'twitter.txt', | |
$tweets_to_display = 1, | |
$ignore_replies = false, | |
$twitter_wrap_open = '<ul id="twitter">', | |
$twitter_wrap_close = '</ul>', | |
$tweet_wrap_open = '<li><span class="status">', | |
$meta_wrap_open = '</span><span class="meta"> ', | |
$meta_wrap_close = '</span>', |
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
//email share function | |
function direct_email($text="Send by email"){ | |
global $post; | |
$title = htmlspecialchars($post->post_title); | |
$excerpt = htmlspecialchars($post->the_excerpt); | |
$subject = 'Article by '.htmlspecialchars(get_bloginfo('name')).': '.$title . $excerpt; | |
$body = 'Check out this article from Justin W Hall: '.$title. "\n" . "\n" .get_permalink($post->ID); | |
$link = '<a rel="nofollow" href="mailto:?subject='.rawurlencode($subject).'&body='.rawurlencode($body).'" title="'.$text.' : '.$title.'">'.$text.'</a>'; | |
return $link; | |
} |
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(document).ready(function() { | |
jQuery('.st_upload_button').click(function() { | |
/* formfield = jQuery('#st_upload').attr('name'); */ | |
targetfield = jQuery(this).prev('.upload-url'); | |
tb_show('', 'media-upload.php?type=image&TB_iframe=true'); | |
return false; | |
}); | |
window.send_to_editor = function(html) { |
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
//Custom Login image | |
add_action("login_head", "my_login_head"); | |
function my_login_head() { | |
echo " | |
<style> | |
body.login #login h1 a { | |
background: url('".get_bloginfo('template_url')."/images/newlogo.png') no-repeat scroll center top transparent; | |
height: 152px; | |
width: 330px; | |
} |
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(document).ready(function() { | |
jQuery('form#contactForm').submit(function() { | |
jQuery('form#contactForm .error').remove(); | |
var hasError = false; | |
jQuery('.requiredField').each(function() { | |
if(jQuery.trim(jQuery(this).val()) == '') { | |
//var labelText = jQuery(this).prev('label').text(); | |
jQuery(this).parent().append('<span class="error text-error">← Required field</span>'); | |
hasError = true; | |
} |
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_action( 'widgets_init', 'example_load_widgets' ); | |
/** | |
* Register our widget. | |
* 'Example_Widget' is the widget class used below. | |
* | |
* @since 0.1 | |
*/ | |
function example_load_widgets() { | |
register_widget( 'Example_Widget' ); |
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
//social share | |
function social_share_it(){ | |
//get the user entered URLS/usernames from WP backend | |
$twitter = mytheme_option('twitter'); | |
$facebook = mytheme_option('facebook'); | |
$googleplus = mytheme_option('googleplus'); | |
?> | |
<?php //print he icons ?> | |
<ul id="social-share"> |
OlderNewer