Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Meta Slider template include:
- Copy & paste this code into a template file to include the slideshow within your theme.
- <?php
- echo do_shortcode("[metaslider id=20345]");
- ?>
- Current template-part-head.php code:
- <?php global $dm_settings; ?>
- <div class="container dmbs-container">
- <?php if ($dm_settings['show_header'] != 0) : ?>
- <div class="row dmbs-header">
- <?php get_template_part('template-part', 'topnav'); ?>
- <a id="logo" href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="http://mypapernet.com/wp-content/uploads/logo.jpg" /></a>
- <div id="search"><?php get_search_form(); ?></div>
- <div id="publications"><img src="/wp-content/uploads/publications.jpg"/>
- <div id="publicationsdropdown">
- <a href="http://mypapernet.com/wp-content/themes/ocalacoupons.com/images/oct2016opn/index.html" target="_blank">Ocala Paper Net</a>
- <a href="http://mypapernet.com/wp-content/themes/ocalacoupons.com/images/sep2016vpn/index.html" target="_blank">The Villages Paper Net</a>
- <a href="http://mypapernet.com/wp-content/themes/ocalacoupons.com/images/sep2016ocm/index.html" target="_blank">Ocala Coupon Magazine</a>
- </div>
- </div>
- <div id="app">
- <a href="https://itunes.apple.com/us/app/ocala-coupons/id994912773?mt=8"><img src="http://mypapernet.com/wp-content/uploads/appstore-e1438196026362.png" /></a>
- <a href="https://play.google.com/store/apps/details?id=hr.apps.n206949039"><img src="http://mypapernet.com/wp-content/uploads/googleplay-e1438196334724.png" /></a>
- </div>
- <div id="social">
- <a href="https://www.facebook.com/PaperNetMagazine"><img src="http://mypapernet.com/wp-content/uploads/fb.jpg" /></a>
- <a href="https://twitter.com/ThePaperNet"><img src="http://mypapernet.com/wp-content/uploads/twitter.jpg" /></a>
- </div>
- </div>
- <div id="adrotator">
- <div id="rotator">
- <?php
- if (is_single()) { ?>
- <?php $postid = get_the_ID();
- $metaimg = array();
- for ($i = 1; $i < 10; $i++) {
- if (get_post_meta($postid,'img'.$i,true) != '') {
- $metaimg[$i] = get_post_meta($postid,'img'.$i,true);
- } else {
- break;
- }
- }
- foreach ($metaimg as $key => $img) { ?>
- <div id="img<?php echo $key; ?>" class="slide"><img src="<?php echo $img; ?>" /></div>
- <?php }
- } else {
- if(is_category()){
- $cats = category_description();
- $cats = str_replace(array('<p>','</p>'),'',$cats);
- $categoriesarr = explode('<br />',$cats);
- $imgn = 1;
- foreach ($categoriesarr as $src) {
- echo '<div id="img'.$imgn.'" class="slide"><img src="'.$src.'" /></div>';
- $imgn++;
- }
- } else {
- ?>
- <div id="img1" class="slide"><img src="http://mypapernet.com/wp-content/themes/ocalacoupons.com/images/lees2.jpg" /></div>
- <div id="img2" class="slide"><A HREF="http://worldcorprealtyllc.com/" target="_blank"><img src="http://mypapernet.com/wp-content/uploads/worldcorpbanner11717.jpg" /></a></div>
- <div id="img3" class="slide"><img src="http://mypapernet.com/wp-content/uploads/sonic.jpg" /></div>
- <div id="img4" class="slide"> <A HREF="/subscribe" target="_blank"><img src="http://mypapernet.com/wp-content/uploads/pals.jpg" /></a></div>
- <?php } } ?>
- </div><br>
- <div id="thumbwrap"><div id="thumbs"></div></div>
- </div>
- <div id="homeboxes">
- <a href="/category/restaurants"><img src="http://mypapernet.com/wp-content/themes/ocalacoupons.com/images/restaurants.jpg" /></a>
- <a href="/category/home-improvement"><img src="http://mypapernet.com/wp-content/themes/ocalacoupons.com/images/home.jpg" /></a>
- <a href="/category/services"><img src="http://mypapernet.com/wp-content/themes/ocalacoupons.com/images/services.jpg" /></a>
- <a href="/category/auto"><img src="http://mypapernet.com/wp-content/themes/ocalacoupons.com/images/auto.jpg" /></a>
- <a href="/category/health"><img src="http://mypapernet.com/wp-content/themes/ocalacoupons.com/images/health.jpg" /></a>
- <a href="/category/beauty"><img src="http://mypapernet.com/wp-content/themes/ocalacoupons.com/images/beauty.jpg" /></a>
- <a href="/category/entertainment"><img src="http://mypapernet.com/wp-content/uploads/retail-1.jpg" /></a>
- </div>
- <div id="dropdown">
- <div id="categories">
- <?php wp_dropdown_categories('show_option_none=Select category');?>
- <script type="text/javascript">
- <!--
- var dropdown = document.getElementById("cat");
- function onCatChange() {
- if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
- location.href = "<?php echo esc_url( home_url( '/' ) ); ?>?cat="+dropdown.options[dropdown.selectedIndex].value;
- }
- }
- dropdown.onchange = onCatChange;
- -->
- wp_list_categories();
- </script>
- </div>
- </div>
- <?php endif; ?>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
- <script type="text/javascript" language="javascript">
- jQuery(document).ready(function() {
- $('#publications').hover(
- function () {
- $('#publicationsdropdown').show();
- },
- function () {
- $('#publicationsdropdown').hide();
- }
- );
- var img = 1;
- var hovering = 0;
- for (i=1;i<=$('#rotator > div').length;i++) {
- $('#thumbs').append('<div id="thumb'+i+'" class="thumb"></div>');
- }
- jQuery('#img'+img).show();
- jQuery('#thumb'+img).addClass('active');
- setInterval(function() {
- if (!hovering) {
- jQuery('#img'+img).hide();
- jQuery('.active').removeClass('active');
- if (img < $('#rotator > div').length) {
- img++;
- } else {
- img = 1;
- }
- jQuery('#img'+img).show();
- jQuery('#thumb'+img).addClass('active');
- }
- }, 3000);
- jQuery("#thumbs .thumb").hover(
- function () {
- jQuery('.active').removeClass('active');
- hovering = 1;
- jQuery('#img'+img).hide();
- img = jQuery(this).attr('id').substr(5);
- jQuery('#img'+img).show();
- jQuery('#thumb'+img).addClass('active');
- },
- function () {
- hovering = 0;
- }
- );
- $('#img1').show();
- $('#searchsubmit').val('');
- $('#testimonial1').show();
- var t = 0;
- setInterval(function() {
- jQuery('#testimonial'+t).hide();
- if (t < $('#testimonials > div').length) {
- t++;
- } else {
- t = 1;
- }
- jQuery('#testimonial'+t).show();
- }, 5000);
- });
- </script>
- <script type="text/javascript" src="https://s3.amazonaws.com/kanta/popup_scripts/toapp.js"></script>
- <link href="https://s3.amazonaws.com/kanta/popup_scripts/toapp.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript">
- ToApp.init({
- variations: {
- iphone: {
- title: "'Ocala Coupons' has an app! Would you like to install it?",
- url: "https://itunes.apple.com/us/app/ocala-coupons/id994912773?ls=1&mt=8"
- },
- android: {
- title: "'Ocala Coupons' has an app! Would you like to install it?",
- url: "https://play.google.com/store/apps/details?id=hr.apps.n206949039"
- }
- },
- choice: "prompt"
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement