Posted on Leave a comment

WordPress Custom Slider Tutorial


( ! ) Notice: A non well formed numeric value encountered in /var/www/html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Call Stack
#TimeMemoryFunctionLocation
10.0001396136{main}( ).../index.php:0
20.0001396424require( '/var/www/html/wp-blog-header.php' ).../index.php:17
30.270412471728require_once( '/var/www/html/wp-includes/template-loader.php' ).../wp-blog-header.php:19
40.277612524704include( '/var/www/html/wp-content/themes/storefront/single.php' ).../template-loader.php:78
50.379013078056get_template_part( ).../single.php:19
60.379013078576locate_template( ).../general-template.php:168
70.379113078672load_template( ).../template.php:671
80.379113078944require( '/var/www/html/wp-content/themes/storefront/content-single.php' ).../template.php:724
90.379813079696do_action( ).../content-single.php:21
100.379813080072WP_Hook->do_action( ).../plugin.php:465
110.379813080072WP_Hook->apply_filters( ).../class-wp-hook.php:310
120.382713083488storefront_post_content( ).../class-wp-hook.php:286
130.382813084560the_content( ).../storefront-template-functions.php:414
140.382913085840apply_filters( ).../post-template.php:247
150.382913086240WP_Hook->apply_filters( ).../plugin.php:208
160.389613164384CrayonWP::the_content( ).../class-wp-hook.php:286
170.393613231248CrayonHighlighter->output( ).../crayon_wp.class.php:703
180.394013233520CrayonFormatter::print_code( ).../crayon_highlighter.class.php:189

( ! ) Notice: A non well formed numeric value encountered in /var/www/html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Call Stack
#TimeMemoryFunctionLocation
10.0001396136{main}( ).../index.php:0
20.0001396424require( '/var/www/html/wp-blog-header.php' ).../index.php:17
30.270412471728require_once( '/var/www/html/wp-includes/template-loader.php' ).../wp-blog-header.php:19
40.277612524704include( '/var/www/html/wp-content/themes/storefront/single.php' ).../template-loader.php:78
50.379013078056get_template_part( ).../single.php:19
60.379013078576locate_template( ).../general-template.php:168
70.379113078672load_template( ).../template.php:671
80.379113078944require( '/var/www/html/wp-content/themes/storefront/content-single.php' ).../template.php:724
90.379813079696do_action( ).../content-single.php:21
100.379813080072WP_Hook->do_action( ).../plugin.php:465
110.379813080072WP_Hook->apply_filters( ).../class-wp-hook.php:310
120.382713083488storefront_post_content( ).../class-wp-hook.php:286
130.382813084560the_content( ).../storefront-template-functions.php:414
140.382913085840apply_filters( ).../post-template.php:247
150.382913086240WP_Hook->apply_filters( ).../plugin.php:208
160.389613164384CrayonWP::the_content( ).../class-wp-hook.php:286
170.393613231248CrayonHighlighter->output( ).../crayon_wp.class.php:703
180.394013233520CrayonFormatter::print_code( ).../crayon_highlighter.class.php:189

( ! ) Notice: A non well formed numeric value encountered in /var/www/html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Call Stack
#TimeMemoryFunctionLocation
10.0001396136{main}( ).../index.php:0
20.0001396424require( '/var/www/html/wp-blog-header.php' ).../index.php:17
30.270412471728require_once( '/var/www/html/wp-includes/template-loader.php' ).../wp-blog-header.php:19
40.277612524704include( '/var/www/html/wp-content/themes/storefront/single.php' ).../template-loader.php:78
50.379013078056get_template_part( ).../single.php:19
60.379013078576locate_template( ).../general-template.php:168
70.379113078672load_template( ).../template.php:671
80.379113078944require( '/var/www/html/wp-content/themes/storefront/content-single.php' ).../template.php:724
90.379813079696do_action( ).../content-single.php:21
100.379813080072WP_Hook->do_action( ).../plugin.php:465
110.379813080072WP_Hook->apply_filters( ).../class-wp-hook.php:310
120.382713083488storefront_post_content( ).../class-wp-hook.php:286
130.382813084560the_content( ).../storefront-template-functions.php:414
140.382913085840apply_filters( ).../post-template.php:247
150.382913086240WP_Hook->apply_filters( ).../plugin.php:208
160.389613164384CrayonWP::the_content( ).../class-wp-hook.php:286
170.399513305728CrayonHighlighter->output( ).../crayon_wp.class.php:703
180.402013257512CrayonFormatter::print_code( ).../crayon_highlighter.class.php:189

( ! ) Notice: A non well formed numeric value encountered in /var/www/html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Call Stack
#TimeMemoryFunctionLocation
10.0001396136{main}( ).../index.php:0
20.0001396424require( '/var/www/html/wp-blog-header.php' ).../index.php:17
30.270412471728require_once( '/var/www/html/wp-includes/template-loader.php' ).../wp-blog-header.php:19
40.277612524704include( '/var/www/html/wp-content/themes/storefront/single.php' ).../template-loader.php:78
50.379013078056get_template_part( ).../single.php:19
60.379013078576locate_template( ).../general-template.php:168
70.379113078672load_template( ).../template.php:671
80.379113078944require( '/var/www/html/wp-content/themes/storefront/content-single.php' ).../template.php:724
90.379813079696do_action( ).../content-single.php:21
100.379813080072WP_Hook->do_action( ).../plugin.php:465
110.379813080072WP_Hook->apply_filters( ).../class-wp-hook.php:310
120.382713083488storefront_post_content( ).../class-wp-hook.php:286
130.382813084560the_content( ).../storefront-template-functions.php:414
140.382913085840apply_filters( ).../post-template.php:247
150.382913086240WP_Hook->apply_filters( ).../plugin.php:208
160.389613164384CrayonWP::the_content( ).../class-wp-hook.php:286
170.399513305728CrayonHighlighter->output( ).../crayon_wp.class.php:703
180.402013257512CrayonFormatter::print_code( ).../crayon_highlighter.class.php:189

( ! ) Notice: A non well formed numeric value encountered in /var/www/html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Call Stack
#TimeMemoryFunctionLocation
10.0001396136{main}( ).../index.php:0
20.0001396424require( '/var/www/html/wp-blog-header.php' ).../index.php:17
30.270412471728require_once( '/var/www/html/wp-includes/template-loader.php' ).../wp-blog-header.php:19
40.277612524704include( '/var/www/html/wp-content/themes/storefront/single.php' ).../template-loader.php:78
50.379013078056get_template_part( ).../single.php:19
60.379013078576locate_template( ).../general-template.php:168
70.379113078672load_template( ).../template.php:671
80.379113078944require( '/var/www/html/wp-content/themes/storefront/content-single.php' ).../template.php:724
90.379813079696do_action( ).../content-single.php:21
100.379813080072WP_Hook->do_action( ).../plugin.php:465
110.379813080072WP_Hook->apply_filters( ).../class-wp-hook.php:310
120.382713083488storefront_post_content( ).../class-wp-hook.php:286
130.382813084560the_content( ).../storefront-template-functions.php:414
140.382913085840apply_filters( ).../post-template.php:247
150.382913086240WP_Hook->apply_filters( ).../plugin.php:208
160.389613164384CrayonWP::the_content( ).../class-wp-hook.php:286
170.407413326808CrayonHighlighter->output( ).../crayon_wp.class.php:703
180.443413387376CrayonFormatter::print_code( ).../crayon_highlighter.class.php:189

( ! ) Notice: A non well formed numeric value encountered in /var/www/html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Call Stack
#TimeMemoryFunctionLocation
10.0001396136{main}( ).../index.php:0
20.0001396424require( '/var/www/html/wp-blog-header.php' ).../index.php:17
30.270412471728require_once( '/var/www/html/wp-includes/template-loader.php' ).../wp-blog-header.php:19
40.277612524704include( '/var/www/html/wp-content/themes/storefront/single.php' ).../template-loader.php:78
50.379013078056get_template_part( ).../single.php:19
60.379013078576locate_template( ).../general-template.php:168
70.379113078672load_template( ).../template.php:671
80.379113078944require( '/var/www/html/wp-content/themes/storefront/content-single.php' ).../template.php:724
90.379813079696do_action( ).../content-single.php:21
100.379813080072WP_Hook->do_action( ).../plugin.php:465
110.379813080072WP_Hook->apply_filters( ).../class-wp-hook.php:310
120.382713083488storefront_post_content( ).../class-wp-hook.php:286
130.382813084560the_content( ).../storefront-template-functions.php:414
140.382913085840apply_filters( ).../post-template.php:247
150.382913086240WP_Hook->apply_filters( ).../plugin.php:208
160.389613164384CrayonWP::the_content( ).../class-wp-hook.php:286
170.407413326808CrayonHighlighter->output( ).../crayon_wp.class.php:703
180.443413387376CrayonFormatter::print_code( ).../crayon_highlighter.class.php:189

If you’ve been following my blog, you’ve seen that I’ve been rebuilding JoshRichet.com as a tool for teaching my class about WordPress. Sometimes creating a great plugin for your WordPress site takes a little rough groundwork laid out by someone with a little more experience. This plugin was intended to be a rough framework for building image-based plugins that insert into WordPress themes or pages easily.

This plugin provides one admin-controlled Zurb Foundation Orbit Slider for your template and assumes that your theme already includes Zurb Foundation like the parent theme used as an example in my classroom.

This plugin provides the WordPress shortcode [jr_custom_slider], and  the PHP function, bg_header_slider() so that it can be inserted into a template or a page with one line.

in a post or page simply insert the following:

In a theme to get the same output as the shortcode, insert the following:

Here is the plugin code: