Skip to content

Instantly share code, notes, and snippets.

@iamandrewpeters
iamandrewpeters / se_snippet.css
Created July 27, 2018 17:55
Change Series Engine Layout
/* Series Engine CSS for two column view */
/* Add this to wherever you put your CSS. Make sure to add the right and left classes */
/* It would be wise to add another class to the 'affects all' if you are applying CSS sitewide and have multiple SE instances */
/* Affects Left Side */
.left-side-sermon-player .enmse-modern-message-meta {
display: none;
}
@iamandrewpeters
iamandrewpeters / series_engine_shortcode_classes.html
Created July 27, 2018 18:07
Adding Series Engine classes to HTML with shortcodes
<div class="left-side-sermon-player">[your series engine shortcode]</div>
<div class="right-side-sermon-player">[your series engine shortcode]</div>
@iamandrewpeters
iamandrewpeters / hide-se-logo.css
Created July 30, 2018 17:45
Hide Series Engine logo
/* Hides the Series Engine Logo */
.enmse-poweredby {
display: none;
}
@iamandrewpeters
iamandrewpeters / sermon-manager-grid-cpl-styles.css
Created August 7, 2018 16:31
HTML and CSS for Sermon Manager and Beaver Builder custom post layout
.fl-post-grid-post {
font-size: 14px;
background-color: #fbfbfb;
border: none;
box-shadow: 0 4px 1px rgba(197, 197, 197, 0.2);
background: #f6f6f6;
transition: all 0.3s linear;
width: 100%;
}
@iamandrewpeters
iamandrewpeters / acf-avatar
Created October 14, 2018 23:22
Use ACF image field as an Avatar
// Use ACF image field as avatar
//Have to create a User image field
add_filter('get_avatar', 'acf_profile_avatar', 10, 5);
function acf_profile_avatar( $avatar, $id_or_email, $size, $default, $alt ) {
// Get user by id or email
if ( is_numeric( $id_or_email ) ) {
$id = (int) $id_or_email;
$user = get_user_by( 'id' , $id );
@iamandrewpeters
iamandrewpeters / another-reach-co-welcome-widget.php
Last active October 18, 2018 14:10
Create a Welcome Widget in the Dashboard
//Add Welcome Widget
//Register the Widget
function reachco_welcome_metabox() {
// Get the current logged in user.
$current_user = wp_get_current_user();
// Grab the users first name.
$name = $current_user->user_firstname;
@iamandrewpeters
iamandrewpeters / login-customization.php
Last active October 18, 2018 15:11
Change Login Logo and URL
//Login Page Customization
//Add the Logo
function reach_login_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url(#); //Replace the # with your image's URL
height:65px;
width:320px;
background-size: 320px 65px;
@iamandrewpeters
iamandrewpeters / staff-post-layout.html
Created October 31, 2018 15:51
Staff Area for Beaver Builder Posts
/* Make Sure to replace my ACF shortcodes with your own*/
[wpbb-if post:featured_image]
<div class="pp-custom-grid-post-image">
[wpbb post:featured_image size="large" display="tag" linked="no"]
</div>
[/wpbb-if]
<div class="pp-custom-grid-post-text">
<h2 class="post-title">[wpbb post:title]</h2>
@iamandrewpeters
iamandrewpeters / description-shortcode.html
Last active October 31, 2018 17:29
Description of Shortcode for Staff Email
//How Conditional Shortcodes work to diplay this
[wpbb-if some-field-connection-shortcode]
<a href="[some-field-connection-shortcode]">my email icon</a>
[/wpbb-if]
[wpbb-if post:acf type='url' name='church_information_staff_email']
<a href="mailto:[wpbb post:acf type='url' name='church_information_staff_email']"><span class="fas fa-envelope-open"></span></a>
[/wpbb-if]
//What we have here is a Beaver Builder shortcode that is conditional.
@iamandrewpeters
iamandrewpeters / add-custom-taxonomies-to-tec.php
Created December 8, 2018 19:21
Add Custom Taxonomies to The Events Cal Filter Bar
// Add custom taxonomies to Filter bar
if (class_exists('Tribe__Events__Filterbar__Filter')):
class Tribe__Events__Filterbar__Custom extends Tribe__Events__Filterbar__Filter {
public $type = 'select';
public function get_admin_form() {
$title = $this->get_title_field();
$type = $this->get_multichoice_type_field();
return $title.$type;
}