Skip to content

Instantly share code, notes, and snippets.

Chris Dillon cdillon

View GitHub Profile
@cdillon
cdillon / no_repeat.php
Created Mar 14, 2018
Don't repeat testimonials on the same page with multiple views.
View no_repeat.php
<?php
/**
* Set global variable to track posts.
*/
function no_repeat_init() {
global $testimonials_showing;
$testimonials_showing = array();
}
add_action( 'wp', 'no_repeat_init' );
@cdillon
cdillon / sample-import-with-categories.csv
Created Nov 28, 2017
An import file with categories for Strong Testimonials.
View sample-import-with-categories.csv
post_type post_status post_title post_content client_name email tax_wpm-testimonial-category
wpm-testimonial publish The testimonial title The testimonial content The person's name The person's email Apple, Banana
@cdillon
cdillon / sample-import-basic.csv
Created Nov 28, 2017
A basic import file for Strong Testimonials.
View sample-import-basic.csv
post_type post_status post_title post_content client_name email
wpm-testimonial publish The testimonial title The testimonial content The person's name The person's email
@cdillon
cdillon / bad-review-redirect.php
Last active Sep 26, 2017
In Strong Testimonials, redirect bad reviews to a different page.
View bad-review-redirect.php
<?php
/**
* Strong Testimonials | Bad review redirect.
*
* IMPORTANT! If adding this to your theme's functions.php, remove line 1: <?php
*
* For help, contact chris@strongplugins.com
*
* @param $location
* @param $status
View strong-testimonials-divi-lucid-style.css
/* ========================
* Lucid Theme improvements
* ========================
*/
/* ---------------------
* if using Divi Builder
* ---------------------
*/
@cdillon
cdillon / functions.php
Created Dec 23, 2016 — forked from bgardner/functions.php
Load a custom style sheet on your site using the Genesis Framework.
View functions.php
<?php
//* Do NOT include the opening php tag
//* Load custom style sheet
add_action( 'wp_enqueue_scripts', 'custom_load_custom_style_sheet' );
function custom_load_custom_style_sheet() {
wp_enqueue_style( 'custom-stylesheet', CHILD_URL . '/custom.css', array(), PARENT_THEME_VERSION );
}
//* Replace default style sheet
View spacious-content-single-wpm-testimonial.php
<?php
/**
* Strong Testimonials - Single testimonial content
*
* For Spacious theme by ThemeGrill
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php do_action( 'spacious_before_post_content' ); ?>
View spacious-single-wpm-testimonial.php
<?php
/**
* Strong Testimonials - Single post section
*
* For Spacious theme by ThemeGrill
*/
?>
<?php get_header(); ?>
@cdillon
cdillon / sc_our_services_admin.css
Created Apr 9, 2016
To fix a simple CSS conflict caused by the [Our Services Showcase] WordPress plugin version 2.0. In the plugin's "inc/style" directory, replace the file "sc_our_services_admin.css" with this.
View sc_our_services_admin.css
/*
Document : sc_our_services_admin
Created on : Jun 25, 2014, 10:07:44 PM
Author : Bilal
Description:
Purpose of the stylesheet follows.
*/
root {
display: block;
View active-plugins-link.php
You can’t perform that action at this time.