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
//Page specific css and/or javascript -- Add to header.php | |
if (is_page_template('page-archives.php')) { ?> | |
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/ archives.css" type="text/css" media="screen" /> | |
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/ js/archives.js"></script> | |
<?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 disable_self_ping( &$links ) { | |
foreach ( $links as $l => $link ) | |
if ( 0 === strpos( $link, get_option( 'home' ) ) ) | |
unset($links[$l]); | |
} | |
add_action( 'pre_ping', 'disable_self_ping' ); |
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 wdc_no_more_jumping($post) { | |
return '<a href="'.get_permalink($post->ID).'" class="read-more">'.'Continue Reading'.'</a>'; | |
} | |
add_filter('excerpt_more', 'wdc_no_more_jumping'); |
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 additional_post_classes( $classes ) { | |
global $wp_query; | |
if( $wp_query->found_posts < 1 ) { | |
return $classes; | |
} | |
if( $wp_query->current_post == 0 ) { | |
$classes[] = 'post-first'; |
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 remove_footer_admin () { | |
echo 'My footer text. Thank you <a href="http://wordpress.org">Wordpress</a> for giving me this filter.'; | |
} | |
add_filter('admin_footer_text', 'remove_footer_admin'); | |
?> |
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 your_dashboard_widget() { ?> | |
<h3>Hello Wordpress user!</h3> | |
<p>Fill this with HTML or PHP.</p> | |
<?php }; | |
function add_your_dashboard_widget() { | |
wp_add_dashboard_widget( 'your_dashboard_widget', __( 'Widget Title!' ), 'your_dashboard_widget' ); | |
} | |
add_action('wp_dashboard_setup', 'add_your_dashboard_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
add_filter('wp_nav_menu_items','add_search_box', 10, 2); | |
function add_search_box($items, $args) { | |
ob_start(); | |
get_search_form(); | |
$searchform = ob_get_contents(); | |
ob_end_clean(); | |
$items .= '<li>' . $searchform . '</li>'; | |
return $items; | |
} |
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'); | |
wp_rss('http://wpforums.com/external.php?type=RSS2', 5); ?> |
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 | |
/* | |
Template Name: Name of your Template | |
*/ | |
?> |
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 add_filter('widget_text', 'do_shortcode') ?> |
NewerOlder