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
#content blockquote { | |
background-color:#F7F7F7; | |
background-position:initial initial; | |
background-repeat:initial initial; | |
border:1px solid #E6E6E6; | |
margin:5px 15px 15px; | |
padding:10px 20px 0 15px; | |
word-wrap:break-word; | |
} |
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 if ( is_page(‘My Page’) ) { ?> | |
<link rel=”stylesheet” href=”URL of style2.css” type=”text/css” media=”screen” /> | |
<?php } else { ?> | |
<link rel=”stylesheet” href=”URL of style.css” type=”text/css” media=”screen” /> | |
<?php } ?> |
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 create_meta_desc() { | |
global $post; | |
if (!is_single()) { return; } | |
$meta = strip_tags($post->post_content); | |
$meta = strip_shortcodes($post->post_content); | |
$meta = str_replace(array("\n", "\r", "\t"), ' ', $meta); | |
$meta = substr($meta, 0, 125); | |
echo "<meta name='description' content='$meta' />"; | |
} | |
add_action('wp_head', 'create_meta_desc'); |
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 | |
include_once(ABSPATH . WPINC . '/rss.php'); | |
$feed = 'http://example.com/feed/'; | |
$rss = fetch_feed($feed); | |
if (!is_wp_error( $rss ) ) : | |
$maxitems = $rss->get_item_quantity(3); | |
$rss_items = $rss->get_items(0, $maxitems); | |
if ($rss_items): | |
echo "<ul>\n"; | |
foreach ( $rss_items as $item ) : |
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 login_enqueue_scripts(){ | |
echo ' | |
<div class="background-cover"></div> | |
<style type="text/css" media="screen"> | |
.background-cover{ | |
background:url('.get_bloginfo('template_directory').'/images/background) no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; |
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 custom_colors() { | |
echo '<style type="text/css">#wphead{background:#069}</style>'; | |
} | |
add_action('admin_head', 'custom_colors'); |
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_filter('wp_mail_from', 'new_mail_from'); | |
add_filter('wp_mail_from_name', 'new_mail_from_name'); | |
function new_mail_from($old) { | |
return 'admin@yourdomain.com'; | |
} | |
function new_mail_from_name($old) { | |
return 'Your Blog Name'; | |
} |
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 my_admin_help($text, $screen) { | |
// Check we're only on my Settings page | |
if (strcmp($screen, MY_PAGEHOOK) == 0 ) { | |
$text = 'Here is some very useful information to help you use this plugin...'; | |
return $text; | |
} | |
// Let the default WP Dashboard help stuff through on other Admin pages | |
return $text; | |
} |