Ondersteuning » Algemeen WordPress » Sidebar probleem…

  • Ik heb een sidebar maar nu wil ik op de voor pagina alles weergeven en als je doorklikt op een pagina/blog bericht. Wil ik alleen de sponsors weer laten geven.

    Nu geeft hij alles weer op de voor pagina maar alleen de poll op verdere pagina’s.

    Code momenteel:

    <div id="sidebar">
      <ul id="sidelist">
        <?php 	/* Widgetized sidebar, if you have the plugin installed. */
    					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Regular Sidebar') ) : ?>
    
        <?php
    // this is where 10 headlines from the current category get printed
    if ( is_single() ) :
    global $post;
    $categories = get_the_category();
    foreach ($categories as $category) :
    ?>
        <li>
          <h2><?php _e('More from this category','branfordmagazine');?></h2>
          <ul class="bullets">
            <?php
    $posts = get_posts('numberposts=10&category='. $category->term_id);
    foreach($posts as $post) :
    ?>
            <li><a href="<?php the_permalink(); ?>">
              <?php the_title(); ?>
              </a></li>
            <?php endforeach; ?>
            <li><strong><a href="<?php echo get_category_link($category->term_id);?>" title="<?php _e('View all posts filed under','branfordmagazine');?> <?php echo $category->name; ?>"><?php _e('Archive for','branfordmagazine');?> '<?php echo $category->name; ?>' &raquo;</a></strong></li>
          </ul>
        </li>
        <?php endforeach; endif ; ?>
        <?php if ( is_home() ) { ?>
        <li>
           <li>
       <?php include (TEMPLATEPATH . '/searchform.php'); ?>
        </li>
    <h3>
            <?php
    	// this is where the name of the News (or whatever) category gets printed
    	wp_list_categories('include=1&title_li=&style=none'); ?>
          </h3>
    
          <?php
    // this is where the last three headlines are pulled from the News (or whatever) category
    		query_posts('showposts=5&offset=1&cat=1');
    		?>
          <ul class="bullets">
            <?php while (have_posts()) : the_post(); ?>
            <li><a href="<?php the_permalink() ?>" rel="bookmark">
              <?php the_title(); ?>
              </a></li>
            <?php endwhile; ?>
          </ul>
        </li>
    
        <li>
          <h3><?php _e('Ads &amp; Sponsors','branfordmagazine');?></h3>
          <!-- I placed this advert here only to not let this place empty. You can remove or change it as you like --> <img src="http://www.schaatskrant.nl/images/250x125-2.png" width="245" height="125" /> </li>
        <li>
     <img src="http://www.schaatskrant.nl/images/125x125-1.png" width="121" height="125" /><img src="http://www.schaatskrant.nl/images/125x125-2.png" width="121" height="125" /><img src="http://www.schaatskrant.nl/images/125x125-3.png" width="121" height="125" /><img src="http://www.schaatskrant.nl/images/125x125-4.png" width="121" height="125" />
    
       <li>
          <h3><?php _e('Browse Categories','branfordmagazine');?></h3>
           <?php wp_list_categories('orderby=order&hide_empty=1&title_li=&exclude=7');?>
        </li>
              <?php } ?>
        <?php if (function_exists('vote_poll') && !in_pollarchive()): ?>
    <li>
       <h2>Polls</h2>
       <ul>
          <li><?php get_poll(1);?></li>
       </ul>
       <?php display_polls_archive_link(); ?>
    </li>
    <?php endif; ?> 
    
      <?php endif; ?>
      </ul>
      <!--END SIDELIST-->
    </div>
    <!--END SIDEBAR-->
  • Het onderwerp ‘Sidebar probleem…’ is gesloten voor nieuwe reacties.