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 custom meta to user profile screen | |
add_action( 'show_user_profile', 'example_show_extra_profile_fields' ); | |
add_action( 'edit_user_profile', 'example_show_extra_profile_fields' ); | |
function example_show_extra_profile_fields( $user ) { ?> | |
<h3>Payment information</h3> |
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 SearchFilter($query) { | |
if ($query->is_search) { | |
$query->set('post_type', 'post'); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','SearchFilter'); |
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 | |
remove_action('genesis_header', 'genesis_do_header'); | |
add_action('genesis_header', 'custom_header'); | |
function custom_header() { | |
?> | |
<div id="logo"> | |
<a href="<?php echo get_bloginfo('url'); ?>"><img src="<?php echo CHILD_URL.'/images/logo.png'; ?>" width="250" height="290" alt="" /></a> | |
</div> | |
<div id="header-right"> |
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_action( 'cmb_render_location_list', 'dss_cmb_render_location_list', 10, 2 ); | |
function dss_cmb_render_location_list( $field, $meta ) { | |
global $post; | |
$tmp_post = $post; | |
// set the args | |
$args = array ( | |
'post_type' => 'locations', | |
'posts_per_page' => -1, |
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 ss_php_memory_check() { | |
echo '<!-- PHP Memory Limit: ' . ini_get( 'memory_limit' ) . ' -->'; | |
} | |
add_action( 'wp_footer', 'ss_php_memory_check', 20 ); |
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 ( 'genesis_before_content_sidebar_wrap', 'example_custom_header' ); | |
function example_custom_header () { | |
echo '<div id="page_featured">'; | |
echo the_post_thumbnail( 'featured-page' ); | |
echo '</div>'; | |
} |
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( 'shortcode_atts_gallery', 'test_post_gallery' ); | |
function test_post_gallery( $args ) { | |
$feat_id = get_post_thumbnail_id(); | |
// bail if no feat image ID | |
if ( !$feat_id ) | |
return $args; |
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 | |
// **** Privacy ******** | |
function restrict_access(){ | |
global $bp, $bp_unfiltered_uri; | |
// If user is not logged in and | |
if (!is_user_logged_in() && | |
( | |
// The current page is not register or activation |
NewerOlder