Skip to content

Instantly share code, notes, and snippets.

<?php
/*
Usage:
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL
if ( !$frag->output() ) { // NOTE, testing for a return of false
functions_that_do_stuff_live();
these_should_echo();
// IMPORTANT
$frag->store();
// YOU CANNOT FORGET THIS. If you do, the site will break.
@antorome
antorome / cdb_title_tax_gdpc_yoast_seo.php
Last active December 16, 2015 17:50
Function for displaying the right title in taxonomies archives when using GD Product Center and Yoast SEO plugins together
<?php
/**
*
* Function for displaying the right title in taxonomies archives
* when using GD Product Center and Yoast SEO plugins together
*
* Just replicate the code in wordpress-seo/frontend/class-frontend.php
* Function get_taxonomy_title()
*
*/