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 a note above the comment form | |
add_action( 'comment_form_top', 'comment_notes' ); | |
function comment_notes() { | |
?> | |
<div class="comment_notes"><?php echo "Here is a message I want to show users when they leave a comment."; ?></div> | |
<style type="text/css"> | |
.comment_notes{ | |
font-family: Helvetica, Arial, sans-serif; | |
font-size:13px; | |
font-weight: bold; |
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
Change - | |
<?php the_excerpt(); ?> | |
<?php | |
if( is_home() && !is_paged() && ($posts[0] == $post) ) { | |
echo apply_filters('the_content', $post->post_content); | |
} else { | |
the_excerpt(); | |
} | |
?> |
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 | |
/* Code that preserves HTML formatting to the automatically generated Excerpt. */ | |
/* Also modifies the default excerpt_length and excerpt_more filters. */ | |
function custom_wp_trim_excerpt($text) { | |
$raw_excerpt = $text; | |
if ( '' == $text ) { | |
$text = get_the_content(''); | |
$text = strip_shortcodes( $text ); |
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 appendPostClassHasFeaturedImageClass($classes) { | |
if(current_theme_supports('post-thumbnails')) | |
if(has_post_thumbnail()) | |
$classes[] = "has-featured-image"; | |
return $classes; | |
} add_filter('post_class', "appendPostClassHasFeaturedImageClass"); |
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 | |
// Show admin bar to all users | |
add_action( 'show_admin_bar', '__return_true' ); | |
add_action( 'template_redirect', 'admin_bar_login_css' ); | |
function admin_bar_login_css() { | |
if ( 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
<HBProfile> | |
<!-- | |
This is my first profile. I wanted to farm skyshards but all the other skyshard profiles I found didn't work after the 5.4 changes and I seen a few people looking too so I wanted to share. | |
This profile will grind the Shao-Tien mobs in Valley of the Four Winds. | |
Mainly for Skyshards, got mine in 2 nights and a day. Should also get lots of greens, cloth, motes of harmony, BOE blues and even 476 BOE Epics. | |
It uses a fairly large path, tries to avoid the Sha mobs. | |
It will fly to the proper area, and fly to venders and back. | |
It will vender Greys only and mail Whites Blue and Epic. Keeps Skyshards, Motes, Cloth, Lockboxes |
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 | |
/** | |
* Include bbPress 'topic' custom post type in WordPress' search results | |
*/ | |
function ntwb_bbp_topic_cpt_search( $topic_search ) { | |
$topic_search['exclude_from_search'] = false; | |
return $topic_search; | |
} | |
add_filter( 'bbp_register_topic_post_type', 'ntwb_bbp_topic_cpt_search' ); |
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
function bootville_lite_landing_excerpt_more($more) { | |
global $post; | |
return '<div class="view-full-post"><p><a href="'. get_permalink($post->ID) . '" | |
class="' . get_theme_mod('bootville_lite_widget_more_color' ) . ' '. get_theme_mod('bootville_lite_landing_widget_button_size') . '">View Full Post</a></p></div>'; | |
} | |
add_filter('excerpt_more', 'bootville_lite_landing_excerpt_more'); |