Skip to content

Instantly share code, notes, and snippets.

@cdillon
cdillon / no_repeat.php
Created March 14, 2018 21:13
Don't repeat testimonials on the same page with multiple views.
<?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 November 28, 2017 06:09
An import file with categories for Strong Testimonials.
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 November 28, 2017 06:07
A basic import file for Strong Testimonials.
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 September 26, 2017 09:07
In Strong Testimonials, redirect bad reviews to a different page.
<?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
/* ========================
* Lucid Theme improvements
* ========================
*/
/* ---------------------
* if using Divi Builder
* ---------------------
*/
@cdillon
cdillon / functions.php
Created December 23, 2016 11:15
Load a custom style sheet on your site using the Genesis Framework.
<?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
<?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' ); ?>
<?php
/**
* Strong Testimonials - Single post section
*
* For Spacious theme by ThemeGrill
*/
?>
<?php get_header(); ?>
@cdillon
cdillon / sc_our_services_admin.css
Created April 9, 2016 21:29
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.
/*
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;