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 | |
// Create an empty array for storage | |
$post_data = array(); | |
// Set arguments for your query | |
$args = array( | |
'post_type' => 'trips', | |
'posts_per_page' => 999 | |
); |
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 | |
/** | |
* Support class for working with arrays. | |
*/ | |
class Arr | |
{ | |
/** | |
* Extend an associative array. | |
* |
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
/** | |
* This gist demonstrates how to properly load jQuery within the context of WordPress-targeted JavaScript so that you don't | |
* have to worry about using things such as `noConflict` or creating your own reference to the jQuery function. | |
* | |
* @version 1.0 | |
*/ | |
(function( $ ) { | |
"use strict"; | |
$(function() { |
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 | |
$blocks = get_field('menu_blocks'); | |
if( $blocks ) $count = 0; | |
{ | |
shuffle( $blocks ); | |
foreach( $blocks as $block ) | |
{ |
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
<a class="directions" href="https://www.google.com/maps?saddr=My+Location&daddr=<?php $location = get_field('map_location'); echo $location['lat'] . ',' . $location['lng']; ?>"><?php _e('Get Directions','roots'); ?></a> |
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
Drew is a front-end developer, <a href="http://www.baltimoredrew.com/">WordPress developer and entrepreneur from Baltimore, MD</a>. With more than five years of freelance experience and over 15 years of development experience, Drew consults clients around the world about their ecommerce needs. To give back to the community Drew regularly attends and speaks at WordCamp events and helps organize the Baltimore WordPress meetup and WordCamp Baltimore. |
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
$feed = simplexml_load_file( 'URL' ); | |
foreach ( $feed->channel->item as $item ) | |
{ | |
if( $counter <= $limit ) | |
{ | |
echo '<p>' . esc_html( $item->title ) . '</p>'; | |
echo '<a href="' . esc_attr( $item->link ) . '">Read more ></a>'; | |
$counter++; | |
} |
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
<!-- start CulinaryLocal widget code --> | |
<a href="http://culinarylocal.com"><img src="http://www.culinarylocal.com/public-assets/logo.png" border="-1" alt="Culinary Local Marketplace" /></a><br/> | |
<script type="text/javascript">document.write('\x3Cscript type="text/javascript" src="' + ('https:' == document.location.protocol ? 'https://' : 'http://') + 'feed.mikle.com/js/rssmikle.js">\x3C/script>');</script><script type="text/javascript">(function() {var params = {rssmikle_url: "http://www.culinarylocal.com/events/feed/",rssmikle_frame_width: "200",rssmikle_frame_height: "350",frame_height_by_article: "0",rssmikle_target: "_blank",rssmikle_font: "Arial, Helvetica, sans-serif",rssmikle_font_size: "12",rssmikle_border: "off",responsive: "off",rssmikle_css_url: "",text_align: "left",text_align2: "left",corner: "on",scrollbar: "on",autoscroll: "on",scrolldirection: "down",scrollstep: "3",mcspeed: "20",sort: "Off",rssmikle_title: "on",rssmikle_title_sentence: "Upcoming Events",rssmikle_title_link: "",rssmikle_tit |
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 | |
/** | |
* Custom PayPal Adaptive Payments args. | |
* | |
* @param array $args | |
* @param WC_Order $order | |
* @return array | |
*/ | |
function custom_woocommerce_paypal_ap_payment_args( $args, $order ) { | |
$args['receiverList'] = array( |
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 $current_user; | |
get_currentuserinfo(); | |
if (is_user_logged_in() && $current_user->ID == $post->post_author) { | |
// Build a list of attendees | |
$attendeeList = TribeEventsTickets::get_event_attendees($event_id); | |
$customerList = array(); |