Skip to content

Instantly share code, notes, and snippets.

<?php
/* =============================================================================
Apply single-session-plan.php to all session plan post types:
Uses $session_plan_slugs global defined below
========================================================================== */
add_filter( 'template_include', function( $template )
{
// session plan post types array:
global $session_plan_slugs;
<?php
/*
Plugin Name: WUWO css2pdf implementation
Plugin URI:
Description: Using the css2pdf library for generating client side WUWO Session Plan PDF export files.
Author: Colin Safranek / css2pdf
Version: 1.0
Author URI: https://github.com/Xportability/css-to-pdf
*/
<div id="member-resources-movements">
<?php
if( function_exists('facetwp_display') )
{
// Facets:
echo '
<div class="movement-library_filters">
' . facetwp_display( 'facet', 'post_title_autocomplete_search' ) . '
</div>
/**
* Ensure that FacetWP detects custom post-type query loops:
* NOTE: the query vars must have a custom 'facetwp' parameter, like this:
$args = array(
'post_type' => 'event',
'posts_per_page' => 10,
'facetwp' => true, // we added this
);
$query = new WP_Query( $args );
*/
@adaptifyDesigns
adaptifyDesigns / wpfacet-movement-library.php
Created April 20, 2016 16:36
FacetWP Autocomplete facet with custom post type query (template).
<?php
///////////////////////////////////////////
// Movement Library:
//////////////////////////////////////////
// Facets:
echo facetwp_display( 'facet', 'post_title_autocomplete_search' );
// The Loop
if ( have_posts() ) {