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 | |
$upcoming_events = date( 'Ymd', strtotime( '+30 days' ) ); // Today + 30 days. | |
$events_args = array( | |
'posts_per_page' => 10, | |
'post_type' => 'event', //Events post type | |
'post_status' => 'publish,future', //Also includes scheduled posts | |
'orderby' => 'meta_value', | |
'meta_key' => 'start_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
<?php | |
/** | |
* Filter GF date and convert to compatible ACF date string | |
* $form['id'] is the id of the Gravity Form and $post_data['post_custom_fields']['event_date'] is the custom field | |
*/ | |
add_filter('gform_post_data', 'custom_update_gf_date', 10, 3); | |
function custom_update_gf_date($post_data, $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 | |
require_once('../../../wp-load.php'); //File was temporarily placed in the theme | |
define( 'WP_DEBUG_DISPLAY', true ); | |
ini_set( 'display_errors', true ); | |
$allposts = get_posts('numberposts=-1&post_type=guide&post_status=any'); //Post query | |
$keys = array('address', 'address2', 'city', 'state', 'zip'); //Add post meta keys here | |
foreach ( $keys as $key ) { | |
foreach( $allposts as $postinfo) { |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/(.*)$ | |
RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads/%1 !-f | |
RewriteRule ^wp-content/uploads/(.*)$ http://www.remotesite.com/wp-content/uploads/$1 [R=301,L] | |
</IfModule> |
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
/** | |
* Format a street address | |
* | |
* @param array $address Address. | |
* | |
* @return null|string | |
*/ | |
function format_address( $address ) { | |
$formatted_address = null; |
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
convert favicon.png -bordercolor white -border 0 \ | |
\( -clone 0 -resize 16x16 \) \ | |
\( -clone 0 -resize 32x32 \) \ | |
\( -clone 0 -resize 48x48 \) \ | |
\( -clone 0 -resize 64x64 \) \ | |
\( -clone 0 -resize 128x128 \) \ | |
\( -clone 0 -resize 256x256 \) \ | |
-delete 0 -alpha off -colors 256 favicon.ico |
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
location ~ ^/wp-content/uploads/(.*) { | |
if (!-f $request_filename) { | |
rewrite ^/wp-content/uploads/(.*)$ http://www.remotesite.com/wp-content/uploads/$1 redirect; | |
} | |
} |
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
<div class="bh-sl-container"> | |
<div class="bh-sl-form-container"> | |
<form id="bh-sl-user-location" method="post" action="#"> | |
<div class="form-input"> | |
<label for="bh-sl-address">Enter Address or Zip Code:</label> | |
<input type="text" id="bh-sl-address" name="bh-sl-address" /> | |
</div> | |
<button id="bh-sl-submit" type="submit">Submit</button> |
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 | |
/** | |
* Manually add categories for static data. | |
* The property ('category' below) should match the property/attribute name in your JSON or XML data. | |
* The value ('category-filter' below) should match the ID of the HTML container element around the input fields. | |
*/ | |
function bh_sl_manual_categories() { | |
?> | |
<script> |
OlderNewer