Add Checkbox Field To Donation Form (copy) (copy)

/** * Collect a checkbox field in the donation form. * * This snippet only works in Charitable 1.5 or above. * * Related examples: * * @see Register a text field (detailed example) – https://github.com/Charitable/library/blob/master/donation-form/register-new-donation-field-1.5.php * @see Register multiple…Continue reading

Add Checkbox Field To Donation Form (copy)

/** * Collect a checkbox field in the donation form. * * This snippet only works in Charitable 1.5 or above. * * Related examples: * * @see Register a text field (detailed example) – https://github.com/Charitable/library/blob/master/donation-form/register-new-donation-field-1.5.php * @see Register multiple…Continue reading

Social Share Buttons (copy)

$post_url = urlencode( get_permalink() ); $post_title = urlencode( get_the_title() ); $facebook_url = “https://www.facebook.com/sharer/sharer.php?u=$post_url”; $x_url = “https://twitter.com/intent/tweet?url=$post_url&text=$post_title”; $linkedin_url = “https://www.linkedin.com/shareArticle?mini=true&url=$post_url&title=$post_title”; $social_buttons = ‘ ‘; echo $social_buttons; // Styles for the social sharing buttons. echo ‘ ‘;Continue reading

Show Sticky Posts on Top of the Archive Templates – WPX Tetris Theme

add_action(‘pre_get_posts’, function($query) { if (!is_admin() && $query->is_main_query() && is_archive() && get_theme_mod(‘universal_toggle_post_badge’, ‘true’)) { $sticky_posts = get_option(‘sticky_posts’); if (!empty($sticky_posts)) { add_filter(‘posts_orderby’, function($orderby, $query) use ($sticky_posts) { global $wpdb; $sticky_list = implode(‘,’, array_map(‘intval’, $sticky_posts)); return “FIELD({$wpdb->posts}.ID, {$sticky_list}) DESC, {$orderby}”; }, 10, 2);…Continue reading