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 | |
//do not copy the opening php tag above | |
/** | |
* Add Category and Tag Heading to Each Page in Pagination | |
* | |
* @package Category and Tag Headings on all archive pages | |
* @author Neil Gee | |
* @link http://coolestguidesontheplanet.com/displaying-category-headings-category-archive-pages-genesis/ | |
* @copyright (c) 2014, Neil Gee |
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
When your WordPress installation is hacked, you can ussually see that the first line on every php file is modified, permitting the execution of malicious code. You will see something like this: | |
<?php $vixtqowrfp = 'c%x78e%x5c%x78b%x5c%x7825gc%x7825ggg)(0)%x5c%x782f+*0f(-!#]y76]277]y72]265....[]...?>[Legitimate code] | |
in every php file (wp-config.php for instance) | |
It is difficult to clean this unless you have a complete backup of your installation. If you have shell access to your hosting or server, you can clean it following these commands | |
Be sure every php file is infected. If not, some legitimate code could be affected, because first line is deleted in every file with this procedure. |
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 //* Mind this opening PHP tag | |
/** | |
* Prints a category's title and description (no markup added) | |
* | |
* @author Ren Ventura | |
* @link http://www.engagewp.com/how-to-display-category-name-description-genesis/ | |
*/ | |
add_action( 'genesis_before_content', 'rv_output_category_info' ); |
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 | |
global $post; | |
$get_posts = tribe_get_events(array('posts_per_page'=>-3,) ); | |
foreach($get_posts as $post) { setup_postdata($post); | |
?> | |
<?php if ( has_post_thumbnail() ) { ?> | |
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
// Get all events from 1 week before the present date to 1 week in the future | |
$events = tribe_get_events( array( | |
'start_date' => date( 'Y-m-d H:i:s', strtotime( '-1 week' ) ), | |
'end_date' => date( 'Y-m-d H:i:s', strtotime( '+1 week' ) ), | |
'eventDisplay' => 'custom', | |
'posts_per_page' => -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
<?php $current_date = date("Y-m-d H:i:s"); ?> | |
<?php $efeed = new WP_Query( array( | |
'post_type' => 'tribe_events', | |
'showposts' => 10, | |
'eventDisplay' => 'custom', | |
'start_date' => $current_date, | |
'end_date' => $current_date | |
)); | |
?> |
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
/* Redirect Vendors to Vendor Dashboard on Login */ | |
add_filter('woocommerce_login_redirect', 'login_redirect', 10, 2); | |
function login_redirect( $redirect_to, $user ) { | |
// WCV dashboard -- Uncomment the 3 lines below if using WC Vendors Free instead of WC Vendors Pro | |
// if (class_exists('WCV_Vendors') && WCV_Vendors::is_vendor( $user->id ) ) { | |
// $redirect_to = get_permalink(WC_Vendors::$pv_options->get_option( 'vendor_dashboard_page' )); | |
// } | |
// WCV Pro Dashboard |
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
OPTION 1 - Add a warning that you need a stronger password. | |
/* WC Vendors - Add a "Need a strong password" notice to the My Account Page */ | |
add_action( 'woocommerce_register_form', 'wcvendors_notify_password_myaccount' ); | |
function wcvendors_notify_password_myaccount() { | |
echo '<strong>Important</strong> -- This site respects your security. We require all new members to use a strong password. If you can not click the Register button, <strong>you need a stronger password</strong>.<br><br>'; | |
} | |
/* WC Vendors - Add a "Need a strong password" notice to the Checkout Page */ | |
add_action( 'woocommerce_after_checkout_registration_form', 'wcvendors_notify_password_checkout' ); | |
function wcvendors_notify_password_checkout() { |
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
/* | |
Enews Plugin | |
-----------------------------------------------------------------*/ | |
.home-cta .enews p { | |
width: 50%; | |
float: left; | |
clear: none; | |
font-size: 28px; | |
margin-right: 4%; |
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
//* Register Horizontal Opt-In widget area | |
genesis_register_sidebar( | |
array( | |
'id' => 'horizontal-opt-in', | |
'name' => __( 'Horizontal Opt-In' ), | |
'description' => __( 'This is the widget area for horizontal opt-in form.' ), | |
) ); | |
//* Display Horizontal Opt-In below Header | |
add_action( 'genesis_after_header', 'sk_horizontal_opt_in' ); |
OlderNewer