Skip to content

Instantly share code, notes, and snippets.

View daltonrooney's full-sized avatar

Dalton Rooney daltonrooney

View GitHub Profile
@mgibbs189
mgibbs189 / test.js
Created March 22, 2016 17:08
Show template after initial interaction
<script>
(function($) {
$(function() {
$(document).on('facetwp-loaded', function() {
if (FWP.loaded) { // after initial pageload
$('.facetwp-template').show();
}
});
});
})(jQuery);
add_filter('the_title', 'filterNestedPagesTitles', 10, 3);
function filterNestedPagesTitles($title, $post_id, $view = false)
{
if ( !is_admin() ) return $title;
$screen = get_current_screen();
if ( $screen->base != 'toplevel_page_nestedpages' ) return $title;
if ( !isset($view) || $view != 'nestedpages_title' ) return $title;
// Code to configure custom title here
$title = 'Custom Title';
return $title;
@mgratch
mgratch / remove-html.php
Last active October 19, 2016 17:38
Batch Strip HTML tags from post/page content. BACKUP YOUR DB BEFORE USING THIS! The plugin should deactivate itself if it's successful.
<?php
/*
* Plugin Name: Remove HTML
* Description: batch Remove HTML from post_content
* Author: Marc Gratch
* Author URI: http://marcgratch.com
* Version: 0.1.0
*/
function rh_get_all_ids(){
$args = array ('post_type' => array('post','page'), 'fields' => 'ids', 'posts_per_page' => -1);