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 | |
// Put the following code in functions.php | |
//* Customize the post info function | |
add_filter( 'genesis_post_info', 'post_info_filter' ); | |
function post_info_filter($post_info) { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]'; | |
return $post_info; | |
} | |
//* Remove the post info function |
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
//remove tags & categories beneth posts | |
function my_remove_post_meta($post_meta) { | |
if (!is_page()) { | |
return; | |
// $post_meta = '[post_categories sep="/" before=""] [post_tags sep="/" before=""]'; | |
// return $post_meta; | |
} | |
} |
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 | |
/* Place the following piece of code in (init function of) your functions.php */ | |
if(current_user_can('subscriber')) { | |
show_admin_bar(false); | |
} | |
?> |
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
/* | |
1. create custom user fields with wordpress (see https://gist.github.com/makbeta/5851535 ) | |
2. clone `register-form.php` from /wp-content/plugins/theme-my-login/templates to your theme | |
3. Add your new field to the registration template | |
*/ | |
<p> | |
<label for="subscription">Customer ID</label> | |
<input type="text" name="subscription" id="subscription<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'subscription' ); ?>" size="20" /><br /> | |
<span class="description">Please enter your customer ID.</span> |
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 my_show_extra_profile_fields( $user ) { ?> | |
<div class="subscription-info"> | |
<h3>Subscription Information</h3> | |
<table class="form-table"> | |
<tr> | |
<th><label for="subscription">Customer ID</label></th> | |
<td> | |
<input type="text" name="subscription" id="subscription" value="<?php echo esc_attr( get_user_meta( $user->ID, 'subscription', 1) ); ?>" class="regular-text" /><br /> | |
<span class="description">Please enter your customer ID.</span> |
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 shortcode support in widgets | |
add_filter('widget_text', 'do_shortcode'); |
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
var currentPath = '${path}'; | |
var redirects = [{ "from":"/give-now","to":"http://localhost"}, | |
{"from":"/z-test/responsive-donation-redirect.html","to":"http://localhost"}]; | |
$.getJSON( "/components/mobile/check-setting.jsp", function(data) { | |
if(data.isMobileDevice) { | |
if(redirects.length > 0) { | |
for(i=0; i<redirects.length; i++) { | |
if(redirects[i].from == currentPath) { | |
console.log('DNL: We are on a mobile device, redirecting to '+redirects[i].to); | |
window.location = redirects[i].to; |
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 addScriptsWhenJQueryIsLoaded(myScripts) { | |
var numScripts = myScripts.length; | |
if (window.jQuery){ | |
//possibly some other JQuery checks to make sure that everything is loaded here | |
console.log('Debug: jQuery loaded, loading scripts, number of script is '+numScripts); | |
window.$ = jQuery.noConflict(); | |
var $anchor = jQuery('#overlay'); |
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
[[?xxnullxx::x[[S1:user_name]]x:: | |
<!-- this person is not logged in --> | |
:: | |
<!-- This person is logged in --> | |
]] |