Ne razumem te bas najbolje, da li sam napisao...?
Ovaj kod koji sam naveo pisem u index.php posle Loopa u delu gde se nalazi kod <?php get_sidebar(); ?> i <?php get_footer(); ?>.
Naravno obrisao sam ovo postojece: <?php get_sidebar(); ?> i tu napisao ovaj moj kod.
Naravno pre toga sam napravio taj drugi sidebar, stranica je
sidebar-ponuda.php i u nju sam stavio ono sto hocu da mi se nadje u tom sidebaru.
Evo kompletnog koda da bi bilo jasnije:
index.php
Code:
<?php
/**
* @package WordPress
* @subpackage Starkers
*/
get_header(); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<p><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></p>
<?php the_content('Read the rest of this entry »'); ?>
<p><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
</div>
<?php endwhile; ?>
<?php if (next_posts_link() || previous_posts_link()): ?>
<?php next_posts_link('« Older Entries') ?> | <?php previous_posts_link('Newer Entries »') ?>
<?php endif ?>
<?php else : ?>
<h2>Not Found</h2>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
<?php endif; ?>
/* ========== Evo ga moj kod ===================== */
<?php if ( is_home() || is_front_page() || is_page('O nama') ) : ?>
<?php get_sidebar('ponuda'); ?>
<?php else : ?>
<?php get_sidebar(); ?>
<?php endif; ?>[/b]
/* ============ end ========================== */
<?php get_footer(); ?>