View event feed
<?php $event_feed = new WP_Query( | |
array( | |
'post_type' => 'tribe_events', | |
'posts_per_page' => $settings->post_items , | |
'eventDisplay' => 'upcoming', | |
'start_date' => $current_date, | |
'end_date' => $current_date, | |
'orderby' => 'start_date', | |
'order' => 'ASC', |
View TSF output
// Output on Single Post | |
<meta name="description" content="Most of us who are close to the WordPress world know that Gutenberg is coming. And probably soon. We’ve been using it here on Cinch and elsewhere in order to…" /> | |
<meta property="og:image" content="https://cinchws.local/wp-content/uploads/2018/09/marco-djallo-127113-unsplash.jpg" /> | |
<meta property="og:image:width" content="1300" /> | |
<meta property="og:image:height" content="450" /> | |
<meta property="og:locale" content="en_US" /> | |
<meta property="og:type" content="article" /> | |
<meta property="og:title" content="This is the test meta title yes! | Cinch Web Services" /> | |
<meta property="og:description" content="Most of us who are close to the WordPress world know that Gutenberg is coming. And probably soon. We’ve been using it here on Cinch and elsewhere in order to get a better understanding of how it works…" /> | |
<meta property="og:url" content="https://cinchws.local/keeping-up-with-gutenberg/" /> |
View Event Calendar Pro feed
<?php $efeed = new WP_Query( array( | |
'post_type' => 'tribe_events', | |
'showposts' => 2, | |
'eventDisplay' => 'upcoming', | |
'start_date' => $current_date, | |
'end_date' => $current_date, | |
'orderby' => 'start_date', | |
'order' => 'ASC', | |
'tax_query' => array( | |
array( |
View product-revision-support.php
/* | |
* Add Revision support to WooCommerce Products | |
* | |
*/ | |
add_filter( 'woocommerce_register_post_type_product', 'cinch_add_revision_support' ); | |
function cinch_add_revision_support( $supports ) { | |
$supports['supports'][] = 'revisions'; |
View reply-to-order-filter.php
add_filter('woocommerce_email_header', 'spigot_reply_to_mail_filter', 11, 3); | |
function spigot_reply_to_mail_filter($headers = '', $ordertype = 'new_order', $order = '') { | |
if(!is_object($order) || empty($order) || $ordertype !== 'new_order') { return $headers; } | |
$name = $order->get_billing_first_name().' '.$order->get_billing_last_name(); | |
$email = $order->get_billing_email(); |
View woo-enable-reviews-bulk-edit.php
<?php | |
/** | |
* | |
* Plugin Name: WooCommerce Enable Reviews - Bulk Edit | |
* Description: Allow enable reviews by bulk edit into WooCommerce | |
* Version: 1.0.0 | |
* Author: Mário Valney | |
* Author URI: http://mariovalney.com | |
* Text Domain: woo-enable-reviews-bulk-edit | |
* |
View svg
<svg class="icon icon--twitter"><use xlink:href="#icon--twitter"></use></svg> |
View hide-title.js
$(".element").hover(function(){ | |
// Get the current title | |
var title = $(this).attr("title"); | |
// Store it in a temporary attribute | |
$(this).attr("tmp_title", title); | |
// Set the title to nothing so we don't see the tooltips | |
$(this).attr("title",""); |
View hide-zero-value.php
/* | |
* Hide zero value on any zero cost shipping methods | |
* | |
*/ | |
add_filter( 'woocommerce_cart_shipping_method_full_label', function( $label, $method ) { | |
if ( $method->cost <= 0 ) { | |
$label = $method->get_label(); |
View woo-checkout-change-default-state.php
/** | |
* Change the default state on the checkout page | |
*/ | |
add_filter( 'default_checkout_billing_country', 'change_default_checkout_country' ); | |
add_filter( 'default_checkout_billing_state', 'change_default_checkout_state' ); | |
function change_default_checkout_state() { | |
return 'XX'; // state code | |
} |
NewerOlder