Jump to content


Photo

Adicionar Nivo Slider Em Todas As Páginas Wordpress


  • Faça o login para participar
Nenhuma resposta neste tópico

#1 danielswater

danielswater

    Novato no fórum

  • Usuários
  • 19 posts
  • Sexo:Não informado

Posted 25/10/2012, 12:15

pessoal boa tarde
peguei um template que e o Boldy que utiliza o nivo slider, eu preciso colocar os slides em todas as páginas
consegui colocar em todas as paginas, jogando o slider para o header, mas os slides so aparecem na pagina inicial, quando entra em outra pagina, so fica dando o loading e nao aparece as imagens

alguem sabe como resolvo isso?

vejam o codigo do meu header
<?php
/**
 * @package WordPress
 * @subpackage Site5 framework
 */
?><!DOCTYPE html>
    <!-- html -->
    <html <?php language_attributes(); ?>>

    <!-- head -->
	<head>

	<!-- title -->
	<meta charset="<?php bloginfo( 'charset' ); ?>" />
    <title><?php wp_title( '|', true, 'right' ); ?> <?php bloginfo('name'); ?></title>

    <!-- meta -->
    <meta name ="viewport" content="width = 1020" />
    <meta name="generator" content="www.site5.com" />
    <?php if ( of_get_option('boldy_enablemeta')== '1') { ?>
    <meta name="description" content="<?php echo of_get_option('boldy_metadescription')  ?>" />
    <meta name="keywords" content="<?php wp_title(); ?>, <?php echo of_get_option('boldy_metakeywords')  ?>" />
    <meta name="revisit-after" content="<?php echo of_get_option('boldy_revisitafter')  ?> days" />
    <?php } ?>
    <?php if ( of_get_option('boldy_enablerobot')== '1') { ?>
    <meta name="robots" content="<?php echo of_get_option('boldy_metabots')  ?>" />
    <meta name="googlebot" content="<?php echo of_get_option('boldy_metagooglebot')  ?>" />
    <?php } ?>

	<link rel="profile" href="http://gmpg.org/xfn/11" />
	
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    
    <?php wp_head(); ?>
    
    <?php if(of_get_option('boldy_css_code') != '') { ?>   
        <?php load_template( get_template_directory() . '/custom.css.php' );?>
    <?php } ?>
    
    <?php if(of_get_option('boldy_customtypography') == '1') { ?>        
        <?php if(of_get_option('boldy_heading_font_link') != '') { ?>
        <?php echo of_get_option('boldy_heading_font_link');?>
        <?php } ?>
    
        <?php load_template( get_template_directory() . '/custom.typography.css.php' );?>
    <?php } ?> 
    

</head>

<body <?php body_class(); ?> <?php if(is_home()){
				echo 'id="home"';
			}elseif(is_page_template('portfolio.php')){
				echo 'id="portfolio"';
			}elseif(is_single() and get_post_type()=='portfolio'){
				echo 'id="portfolio"';
			}?>>
<!-- BEGINN MAINWRAPPER -->
<div id="mainWrapper">
	<!-- BEGIN WRAPPER -->
    <div id="wrapper">
		<!-- BEGIN HEADER -->
        <header>
            <div id="logo">
                <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
                <?php if ( !of_get_option('boldy_clogo')== '') { ?>
					<img src="<?php echo of_get_option('boldy_clogo'); ?>" alt="<?php echo bloginfo( 'name' ) ?>" />
				<?php } elseif( !of_get_option('boldy_clogo_text')== '') {
				        echo of_get_option('boldy_clogo_text'); 
                    } else {
					bloginfo( 'name' );
				    }?>
                </a>
                <span><?php bloginfo('description'); ?></span>
                </div>
			<!-- BEGIN MAIN MENU -->
            <nav id="mainMenu" class="ddsmoothmenu">            
			<?php wp_nav_menu( array( 'theme_location' => 'main_nav', 'container'=>'false', 'fallback_cb'=>'primarymenu') );?>
            </nav>            
            <!-- END MAIN MENU -->
			<!-- BEGIN TOP SEARCH -->
			<div id="topSearch">
				<form id="searchform" action="<?php bloginfo('url'); ?>/" method="get">
					<input type="submit" value="" id="searchsubmit"/>
					<input type="text" id="s" name="s" value="<?php _e("type your search", "site5framework"); ?>" />
				</form>
			</div>
			<!-- END TOP SEARCH -->
			<!-- BEGIN TOP SOCIAL LINKS -->
			<div id="topSocial">
				<ul>
                    
					<?php if(of_get_option('boldy_linkedin_link')!=""){ ?>
					<li><a href="<?php echo of_get_option('boldy_linkedin_link'); ?>" class="linkedin" title="<?php _e("Join us on LinkedIn!", "site5framework"); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/ico_linkedin.png" alt="<?php _e("LinkedIn", "site5framework"); ?>" /></a></li>
					<?php }?>
                    <?php if(of_get_option('boldy_twitter_user')!=""){ ?>
					<li><a href="http://www.twitter.com/<?php echo of_get_option('boldy_twitter_user'); ?>" class="twitter" title="<?php _e("Follow Us on Twitter!", "site5framework"); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/ico_twitter.png" alt="<?php _e("Follow Us on Twitter!", "site5framework"); ?>" /></a></li>
					<?php }?>
					<?php if(of_get_option('boldy_facebook_link')!=""){ ?>
					<li><a href="<?php echo of_get_option('boldy_facebook_link'); ?>" class="twitter" title="Join Us on Facebook!"><img src="<?php bloginfo('template_directory'); ?>/images/ico_facebook.png" alt="Join Us on Facebook!" /></a></li>
					<?php }?>
					<li><a href="<?php bloginfo('rss2_url'); ?>" title="RSS" class="rss"><img src="<?php bloginfo('template_directory'); ?>/images/ico_rss.png" alt="Subcribe to Our RSS Feed" /></a></li>
				</ul>
			</div>	
			<!-- END TOP SOCIAL LINKS -->
        </header>
        <!-- END HEADER -->
        
        
        
        
        
        <!-- BEGIN SLIDER -->
	  		<?php if(of_get_option('boldy_displayslider')==1){
	  		   $slideshowloop = new WP_Query( array( 'post_type' => 'sliderpost', 'order' => 'ASC' ) ); ?>
	<div id="slider">
	<?php 
			if($slideshowloop -> have_posts()){
			while ( $slideshowloop->have_posts() ) : $slideshowloop->the_post();
			$linkto = get_post_meta($post->ID,'boldys_slidelink',TRUE);
			?>
			<a href="<?php echo $linkto;?>">
			<img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo  get_image_url(get_post_meta($post->ID,'boldys_slideimage_src',TRUE)); ?>&amp;h=370&amp;w=960&amp;zc=1" alt="<?php the_title(); ?>" title="<?php echo get_post_meta($post->ID,'boldys_slidecaption',TRUE);?>" />
			</a>
			<?php 
			endwhile;
			}else{?>
				<div style="border:1px solid #ddd; background:#000; opacity:0.5;text-align:center; padding:150px 100px 0; height:219px; font-size:14px; ">				<span style="opacity:1;color:#fff;text-shadow:none;"><?php _e("This is the slider. In order to have items here you need to create them in Admin &gt; Slider section, on the left side menu. For proper display use images 960px x 370px.", "site5framework"); ?></span>
				</div>
			<?php }?>
			
	  </div>
      
	   <!-- END SLIDER -->
	    <!-- SLIDER SETTINGS -->
	   <script type="text/javascript">
            $j = jQuery.noConflict();
			$j(window).load(function() {
				$j('#slider').nivoSlider({
					effect:'<?php if(of_get_option('boldy_slidereffect')==''): echo 'random';
						  else: echo of_get_option('boldy_slidereffect');
						  endif;?>',
					slices:<?php if(of_get_option('boldy_showslide')==''): echo '15';
						  else: echo of_get_option('boldy_showslide');
						  endif;?>,
					animSpeed:<?php if(of_get_option('boldy_slideranimationspeed')==''): echo '500';
						  else: echo of_get_option('boldy_slideranimationspeed');
						  endif;?>,
					pauseTime:<?php if(of_get_option('boldy_sliderpausetime')==''): echo '3000';
						  else: echo of_get_option('boldy_sliderpausetime');
						  endif;?>,
					startSlide:0, //Set starting Slide (0 index)
					directionNav:true, //Next &amp; Prev
					directionNavHide:true, //Only show on hover
					controlNav:true, //1,2,3...
					controlNavThumbs:false, //Use thumbnails for Control Nav
					controlNavThumbsFromRel:false, //Use image rel for thumbs
					controlNavThumbsSearch: '.jpg', //Replace this with...
					controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
					keyboardNav:true, //Use left &amp; right arrows
					pauseOnHover:true, //Stop animation while hovering
					manualAdvance:false, //Force manual transitions
					captionOpacity:<?php if(of_get_option('boldy_slidercaptionopacity')==''): echo '0.8';
						  else: echo of_get_option('boldy_slidercaptionopacity');
						  endif;?>, //Universal caption opacity
					beforeChange: function(){},
					afterChange: function(){},
					slideshowEnd: function(){} //Triggers after all slides have been shown
				});
			});
			</script>
	   <!-- END SLIDER -->
		<?php	} else{?>
				<div style="border:1px solid #ddd; text-align:center; padding:150px 100px 0; height:219px; font-size:14px;">
					<?php _e("This is the slider. In order to have items here you need to create them in Admin &gt; Slider section, on the left side menu. For proper display use images 960px x 370px.", "site5framework"); ?>
				</div>
			<?php }?>
            <div style="width:960px; margin:0 auto; background:url(<?php bloginfo('template_directory'); ?>/images/bk_shadow_slider.png) 0 0 no-repeat; height:50px;"></div>
        
        
        
        
		
		<!-- BEGIN CONTENT -->
		<div id="content">
:
agradeço muito quem puder me ajudar




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq