Skip to content

Instantly share code, notes, and snippets.

View SauntValerian's full-sized avatar

Peter Davenport SauntValerian

View GitHub Profile
@SauntValerian
SauntValerian / gist:a79845e301de969017e714a96ffee6da
Last active July 14, 2019 20:03
Multiple Loops for FacetWP
<?php $args = array(
'post_type' => 'location',
'posts_per_page' => -1,
'order' => 'ASC',
'orderby' => 'title',
'facetwp' => true,
'tax_query' => array(
array(
'taxonomy' => 'advertiser-level',
'field' => 'slug',
// Don't use multiple loops here. Loop through all your posts once, and store each post into an array depending on which tier it falls into. E.g.
$tiers = array(
'platinum' => array(),
'gold' => array(),
'silver' => array(),
'bronze' => array()
);
@SauntValerian
SauntValerian / html-tier-sections.php
Last active August 11, 2017 19:17
HTML sections per tier
// Below are the sections of HTML that I need to work into the template file for the loop I am trying to figure out.
// PLATINUM
<div class="location_indv_post platinum">
<div class="location-main-img-title">
<h3>
<a href="<?php the_permalink(); ?>"><?php the_title(); the_favorites_button(); ?></a>
</h3>
<a href="<?php the_permalink(); ?>">
<?php
@SauntValerian
SauntValerian / tier-sections.php
Created August 11, 2017 19:19
tier sections for loop
// Below are the sections of HTML that I need to work into the template file for the loop I am trying to figure out.
// PLATINUM
<div class="location_indv_post platinum">
<div class="location-main-img-title">
<h3>
<a href="<?php the_permalink(); ?>"><?php the_title(); the_favorites_button(); ?></a>
</h3>
<a href="<?php the_permalink(); ?>">
<?php
@SauntValerian
SauntValerian / print.css
Created September 9, 2018 00:40
Print Styles for Gigi
/* Print Style Sheet */
@media print {
@page {
size: landscape;
margin: 0.5cm;
}
.post-type-archive-tribe_events header,
.fl-builder-content-4082,
#tribe-events-bar,
@SauntValerian
SauntValerian / port-orford-map.html
Created September 26, 2018 14:44
Snippet to embed Port Orford Map
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d11719.22185466582!2d-124.50423475683715!3d42.750167923457425!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x54c4ceffa19a8e71%3A0xa198b7e548bab16f!2sPort+Orford%2C+OR+97465!5e0!3m2!1sen!2sus!4v1537972831929" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
<?php
/**
* Opcache integration class.
*
* @since 2.1.0
* @package Hummingbird\Core\Integration
*/
namespace Hummingbird\Core\Integration;
@SauntValerian
SauntValerian / bbpress-mentions-suggest.php
Created March 21, 2020 18:14
Use BuddyPress @mentions in BBPress forums
<?php
/*
Plugin Name: bbp Mentions Suggest
Plugin URI: http://www.rewweb.co.uk/mentions_suggest
Description: Adds the Buddypress mentions suggest as you type to bbpress topics and replies
Version: 1.3
Author: Robin Wilson
Author URI: http://www.rewweb.co.uk
License: GPL2
*/
@SauntValerian
SauntValerian / KF Tracking-Tags.html
Last active June 19, 2020 14:11
K&F Tracking Tags
<!-- Both of these need to be placed in the head section -->
<!-- Pinterest tracking code -->
<meta name="p:domain_verify" content="58a84fe837e1ce0c0bb573561d5bb61a“/>
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};