Set WP Login Url To Charitable Login Page

/** * Always use the Charitable login page as the login. * * @param string $login_url The login URL. Not HTML-encoded. * @param string $redirect The path to redirect to on login, if supplied. * @param bool $force_reauth Whether to…Continue reading

Add Accept Terms Field

/** * Add a Terms and Conditions donation field, showing * whether the donor accepted terms and conditions when * they donated. */ add_action( ‘init’, function() { /* Create the `Charitable_Donation_Field` object. */ $field = new Charitable_Donation_Field( ‘accept_terms’, array( ‘label’…Continue reading

Display the Last Updated Date (copy)

$u_time = get_the_time( ‘U’ ); $u_modified_time = get_the_modified_time( ‘U’ ); // Only display modified date if 24hrs have passed since the post was published. if ( $u_modified_time >= $u_time + 86400 ) { $updated_date = get_the_modified_time( ‘F jS, Y’ );…Continue reading

Global css

CSS.root /* Link */ #activity-stream .activity-header a{ font-size:14px !important; font-weight:900 !important; } /* Division */ #bp-nouveau-activity-form form > div:nth-child(5){ display:none; } /* Nouveau activity form */ #bp-nouveau-activity-form{ padding-left:5px; padding-right:5px; margin-left:1px; margin-right:3px; padding-bottom:23px; margin-bottom:-7px; } /* Stories user stories */ #buddypress…Continue reading

Add the page slug body class

function wpcode_snippet_add_slug_body_class( $classes ) { global $post; if ( isset( $post ) ) { $classes[] = $post->post_type . ‘-‘ . $post->post_name; } return $classes; } add_filter( ‘body_class’, ‘wpcode_snippet_add_slug_body_class’ );Continue reading

Change Read More Text for Excerpts

function wpcode_snippets_change_read_more( $read_more, $read_more_text ) { // Edit the line below to add your own “Read More” text. $custom_text = ‘Read the whole post’; $read_more = str_replace( $read_more_text, $custom_text, $read_more ); return $read_more; } add_filter( ‘the_content_more_link’, ‘wpcode_snippets_change_read_more’, 15, 2 );Continue reading