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 | |
/* Template Name: Genesis and SearchWP integration with pagination */ | |
function prefix_searchwp_form( $query ) { | |
echo '<form class="searchwp-form" action="" method="get">'; | |
echo '<input type="text" id="searchwpquery" name="searchwpquery" value="' . esc_attr( $query ) . '" />'; | |
echo '<button type="submit">' . __( 'Search', 'text-domain' ) . '</button>'; | |
echo '</form>'; | |
} |
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 will make members signing up for membership level #1 authors and make them subscribers when they cancel. | |
*/ | |
function my_pmpro_after_change_membership_level($level_id, $user_id) | |
{ | |
if($level_id == 1) | |
{ | |
//New member of level #1. If they are a subscriber, make them an author. | |
$wp_user_object = new WP_User($user_id); |
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
/** | |
* Change login logo | |
* Max image width should be 320px | |
* @link http://andrew.hedges.name/experiments/aspect_ratio/ | |
*/ | |
add_action('login_head', 'rgt_custom_dashboard_logo'); | |
function rgt_custom_dashboard_logo() { | |
echo '<style type="text/css"> | |
.login h1 a { | |
background-image:url('.get_stylesheet_directory_uri().'/images/logo.png) !important; |
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 file adds the SearchWP Images template to your theme. | |
* | |
* Template Name: SearchWP Images | |
* | |
* @author Robert Neu | |
* @package Genesis | |
* @subpackage SearchWP | |
*/ |
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 | |
/* | |
Adding First and Last Name to Checkout Form | |
*/ | |
//add the fields to the form | |
function my_pmpro_checkout_after_password() | |
{ | |
if(!empty($_REQUEST['firstname'])) | |
$firstname = $_REQUEST['firstname']; |