Skip to content

Instantly share code, notes, and snippets.

@BinaryMoon
Last active September 18, 2018 08:06
Show Gist options
  • Save BinaryMoon/681621ae5b3e884c782c42f82eb7f078 to your computer and use it in GitHub Desktop.
Save BinaryMoon/681621ae5b3e884c782c42f82eb7f078 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: Opti Add Slider
* Plugin URI: https://prothemedesign.com
* Description: Add a slider to the Opti header.
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
* Text Domain: opti
*/
function opti_add_slider() {
if ( ! is_front_page() ) {
return;
}
echo do_shortcode('[metaslider id="36505"]');
}
add_action( 'opti_after_header', 'opti_add_slider' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment