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 in new Widget areas | |
function genesischild_extra_widgets() { | |
genesis_register_sidebar( array( | |
'id' => 'preheaderleft', | |
'name' => __( 'preHeaderLeft', 'genesischild' ), | |
'description' => __( 'This is the preheader Left area', 'genesischild' ), | |
'before_widget' => '<div class="first one-half preheaderleft">', | |
'after_widget' => '</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
genesis_register_sidebar( array( | |
'id' => 'nav-social-menu', | |
'name' => __( 'Nav Social Menu', 'your-theme-slug' ), | |
'description' => __( 'This is the nav social menu section.', 'your-theme-slug' ), | |
) ); | |
add_filter( 'genesis_nav_items', 'sws_social_icons', 10, 2 ); | |
add_filter( 'wp_nav_menu_items', 'sws_social_icons', 10, 2 ); | |
function sws_social_icons($menu, $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
/* | |
Remove user role when users cancel. | |
*/ | |
function my_pmpro_after_change_membership_level($level_id, $user_id) | |
{ | |
if(empty($level_id)) | |
{ | |
//If they are a subscriber, remove their role. | |
$wp_user_object = new WP_User($user_id); | |
if(in_array("subscriber", $wp_user_object->roles)) |
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 | |
/* | |
This code assumes you already have custom roles created | |
for bronzemember, silvermember, and goldmember. | |
Members signing up for membership level #1 get "Bronze Member" role. | |
Members signing up for membership level #2 get "Silver Member" role. | |
Members signing up for membership level #3 get "Gold Member" role. | |
Members cancelling are given the subscriber role. | |
Admin users are ignored. | |
*/ |
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 | |
/* | |
Plugin Name: PMPro Customizations | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customizations for Paid Memberships Pro (14 day trial on level 1) | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
*/ |
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
/* | |
==================================================================== | |
Adding Purchase Link to Woocommerce Product in Wordpress Dashboard | |
==================================================================== | |
*/ | |
if (is_admin()) { | |
add_action('admin_print_scripts', 'add_direct_checkout_link'); | |
function add_direct_checkout_link() { | |
?> |
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 // get_template_part('archive-kb'); ?> | |
<?php | |
/** | |
* The template for displaying Archive pages | |
* | |
* Used to display archive-type pages if nothing more specific matches a query. | |
* For example, puts together date-based pages if no date.php file exists. | |
* |
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 | |
if ( ( is_user_logged_in() && $current_user->ID == $post->post_author ) ) { // Execute code if user is logged in or user is the author | |
acf_form_head(); | |
wp_deregister_style( 'wp-admin' ); | |
} | |
get_header(); | |
?> |
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
/* Optimize Press 2.0 Smooth Scroll */ | |
/* Add this to your page-setting */ | |
/* Anchor tag jump will be smooth */ | |
<script> | |
opjq(function($) { | |
$('a[href*="#"]:not([href="#"])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(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
.cf-wrapper{ | |
position: relative; | |
} | |
#left-input { | |
width: 47%; | |
float: left; | |
margin-right:6%; | |
} | |
OlderNewer