• Witam, mam ogromny problem z sliderem a mianowicie zamiast wyświetlania tego czego ja oczekuję czyli wpisów ze wskazanej kategorii nie wyświetla mi się kompletnie nic. Kombinuję jak koń pod górę już 2 dzień i nie mogę dojść co jest nie tak.

    Kod slidera:

    <div id=”mygallery” class=”stepcarousel”>
    <div class=”belt”>

    <?php
    $slidecat = get_option(’stlsh_sldcat’);
    $slidenum = get_option(’stlsh_numbslid’);
    $my_query = new WP_Query(’category_name= .’&slidecat .’&showposts= ’.$slidenum.”);
    while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID; „thumb”
    ?>
    <div class=”panel” >

    <div class=”thumbnail2″>
    <?php // This will show the image and link the image to the post. Alter the width and height (in both places) to your needs.?>
    <?php if ( get_post_meta($post->ID, 'thumb’, true) ) {?>
    <div class=”postthumb”>
    ” rel=”bookmark” title=”<?php the_title(); ?>”><img src=”<?php bloginfo(’stylish’); ?>/timthumb.php?src=<?php echo get_post_meta($post->ID, „thumb”, $single = true); ?>&h=400&w=580&zc=1″ alt=”<?php the_title();?>” width=”290″ height=”200″/>
    </div>
    <?php }?>
    </div>

    <div class=”imgshad”>
    </div>

    </div>

    <?php endwhile; ?>

    </div>
    </div>

    Kod nagłówka:

    <!DOCTYPE html PUBLIC „-//W3C//DTD XHTML 1.0 Transitional//EN” „http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
    <html xmlns=”http://www.w3.org/1999/xhtml”&gt;
    <head profile=”http://gmpg.org/xfn/11″&gt;

    <title><?php bloginfo(’name’) ?><?php if ( is_404() ) : ?> » <?php _e(’Not Found’) ?><?php elseif ( is_home() ) : ?> » <?php bloginfo(’description’) ?><?php else : ?><?php wp_title() ?><?php endif ?></title>

    <meta http-equiv=”Content-Type” content=”<?php bloginfo(’html_type’); ?>; charset=<?php bloginfo(’charset’); ?>” />
    <meta name=”generator” content=”WordPress <?php bloginfo(’version’); ?>” />
    <!– leave this for stats –>

    <?php
    $tcol = get_option(’stlsh_tempcol’);

    ?>
    <link rel=”stylesheet” href=”<?php bloginfo(’stylesheet_directory’); ?>/style-<?php echo ($tcol); ?>.css” type=”text/css” media=”screen” />

    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php bloginfo(’rss2_url’); ?>” />
    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”<?php bloginfo(’rss_url’); ?>” />
    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(’atom_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(’pingback_url’); ?>” /><?php wp_head(); ?>
    <!–[if lte IE 6]>
    <link rel=”stylesheet” type=”text/css” media=”all” href=”<?php bloginfo(’stylesheet_directory’); ?>/ie6style.css” />
    <![endif]–>
    <!–[if IE 7]>
    <link rel=”stylesheet” type=”text/css” media=”all” href=”<?php bloginfo(’stylesheet_directory’); ?>/ie7style.css” />
    <![endif]–>

    <!–[if lt IE 7]>
    <script src=”http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js&#8221; type=”text/javascript”></script><![endif]–>

    <?php wp_get_archives(’type=monthly&format=link’); ?>
    <?php //comments_popup_script(); // off by default ?>
    <?php wp_head(); ?>

    <script language=”javascript” type=”text/javascript” src=”<?php bloginfo(’template_directory’); ?>/js/jquery.min.js”></script>
    <script type=”text/javascript” src=”<?php bloginfo(’template_directory’); ?>/js/stepcarousel.js”></script>
    <script type=”text/javascript”>

    stepcarousel.setup({
    galleryid: 'mygallery’, //id of carousel DIV
    beltclass: 'belt’, //class of inner „belt” DIV containing all the panel DIVs
    panelclass: 'panel’, //class of panel DIVs each holding content
    autostep: {enable:true, moveby:1, pause:3000},
    panelbehavior: {speed:500, wraparound:true, persist:true},
    defaultbuttons: {enable: true, moveby: 1, leftnav: ['<?php bloginfo(’template_directory’); ?>/images-<?php echo ($tcol); ?>/carleft-trans.png’, 25, 105], rightnav: ['<?php bloginfo(’template_directory’); ?>/images-<?php echo ($tcol); ?>/carright-trans.png’, -47, 105]},
    statusvars: [’statusA’, 'statusB’, 'statusC’], //register 3 variables that contain current panel (start), current panel (last), and total panels
    contenttype: [’inline’] //content setting [’inline’] or [’ajax’, 'path_to_external_file’]
    })

    </script>
    <script language=”javascript” type=”text/javascript” src=”<?php bloginfo(’template_directory’); ?>/js/jquery.min.js”></script>
    <script type=”text/javascript” src=”<?php bloginfo(’template_directory’); ?>/js/widget.js”></script>
    <script type=”text/javascript” src=”<?php bloginfo(’template_directory’); ?>/js/custom.js”></script>
    <script type=”text/javascript” src=”<?php bloginfo(’template_directory’); ?>/js/menu.js”></script>
    <script type=”text/javascript” src=”<?php bloginfo(’template_directory’); ?>/js/jquery.js”></script>
    <script type=”text/javascript” src=”<?php bloginfo(’template_directory’); ?>/js/toggle.js”></script>
    <script type=”text/javascript”>

    /**
    Vertigo Tip by http://www.vertigo-project.com
    Requires jQuery
    */

    this.vtip = function() {
    this.xOffset = -10; // x distance from mouse
    this.yOffset = 10; // y distance from mouse

    $(„.vtip”).unbind().hover(
    function(e) {
    this.t = this.title;
    this.title = ”;
    this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);

    $(’body’).append( '<p id=”vtip”><img id=”vtipArrow” />’ + this.t + '</p>’ );

    $(’p#vtip #vtipArrow’).attr(„src”, '<?php bloginfo(’template_directory’); ?>/images-<?php echo ($tcol); ?>/vtip_arrow.png’);
    $(’p#vtip’).css(„top”, this.top+”px”).css(„left”, this.left+”px”).fadeIn(„slow”);

    },
    function() {
    this.title = this.t;
    $(„p#vtip”).fadeOut(„slow”).remove();
    }
    ).mousemove(
    function(e) {
    this.top = (e.pageY + yOffset);
    this.left = (e.pageX + xOffset);

    $(„p#vtip”).css(„top”, this.top+”px”).css(„left”, this.left+”px”);
    }
    );

    };

    jQuery(document).ready(function($){vtip();})

    </script>

    </head>
    <body>
    <div id=”wrapper”>
    <div id=”header”>
    <div class=”header”>
    <div class=”logo”>
    <?php
    $tlogo = get_option(’stlsh_tlogo’);

    ?>
    ” title=”<?php bloginfo(’description’); ?>”><img src=”<?php if ( ($tlogo) != „”) { echo ($tlogo); } else { bloginfo(’template_directory’);?>/images-<?php echo ($tcol); ?>/logo-trans.png <?php } ?>” alt=”” style=”vertical-align:bottom; border:0px; height:90px ; width:300px;margin-top:10px;” />

    </div>

    </div>

    <div class=”navigation”>
    <div class=”navleft”>
    </div>
    <div class=”navcenter”>
    <div class=”navbar”>
    <ul id=”nav”>

    <?php if (get_option(’stlsh_deshpl’) == 'display’) : ?>

    • „>Home
    • <?php else : ?><?php endif; ?>
      <?php wp_list_pages(’sort_column=menu_order&title_li=’); ?>

      </div>
      </div>
      <div class=”navright”>
      </div>
      </div>

      <div class=”toppannel”>
      <div class=”tpl”>
      </div>
      <div class=”tps”>
      <div class=”welcom”>
      <div class=”welcomtitle”>
      <?php
      $wtitle = get_option(’stlsh_wtitle’);

      ?>
      <h1><?php if ( ($wtitle) != „”) { echo ($wtitle); } else { echo ( ” Welcome World ! ” );} ?></h1>
      </div>

      <div class=”welcomdesc”>
      <?php
      $wmessage = get_option(’stlsh_wmessage’);

      ?>
      <h2><?php if ( ($wmessage) != „”) { echo ($wmessage); } else { echo ( ” Here you can put your welcome message or blog description. ” );} ?></h2>
      </div>
      </div>

      <div id=”slider”>

      <?php $includes_path = TEMPLATEPATH . '/includes/’;?>
      <?php include($includes_path . '/slide.php’); ?>
      </div>
      </div>
      <div class=”tpr”>
      </div>
      </div>
      <div class=”categmenu”>
      <ul id=”nav2″>

      </div>

      </div>

    Co jest nie tak? Dodam, że całość jest oparta na stronach. Wpisy mają być tylko w sliderze.

Zobacz 1 odpowiedź (z 1 wszystkich)
Zobacz 1 odpowiedź (z 1 wszystkich)
  • Temat ‘Problem z sliderem’ jest zamknięty na nowe odpowiedzi.