Let the sidebar appear on every post and page


Author Message
Jeroen

Posted: 1/6/2010
Quote message 

Hi,
I'm a new Wordpress and Artisteer user and very content so far.
I'm making a non-blog website and I want to have the sidebar on all pages and posts appear. The sidebar contains the categories and search-field and works like a navigation in this way.

This is an issue which is discussed a lot on the web, and explained here.
http://codex.wordpress.org/Customizing_Your_Sidebar

But in the artisteer themes I cannot find the "narrowcolumn" and "widecolumn" part in page.php and single.php. It seems that Artisteer generates other themes than usual.

Does somebody knows a solution for this issue. I'm not familliar with PHP, it is just trail and error what I do.

Thanks in advance.
Regards
Jeroen
 
Adeptris

Posted: 1/6/2010
Quote message 

Hi Jeroen,
Artisteer adds the code in for the sidebars if you add the sidebars at the design stage, in the files you will see some code near the bottom

</div>
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
</div>

or
</div>
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
<?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
</div>

Is that what you are looking for?

David
 
Jeroen

Posted: 1/6/2010
Quote message 

Hi David,

Thanks for your quick reply.
The code you describe is in the page.php indeed. But still does the sidebar not appear.

This is my site:
http://dingemansarchitectuur.nl/

If a visitor clicks on CONTACT NIEUWS or VISION will the sidebar dissapear. I don't see an option in Artisteer to design a specific layout for the post and single pages.

Regards,
Jeroen



 
Garry

Posted: 1/6/2010
Quote message 

Do you wanna display sidebar on all the static pages and posts pages, or exclude it from specific pages.
 
Jeroen

Posted: 1/6/2010
Quote message 

Hi Gary,

I want do display the sidebar everywhere, but it seems that the Artisteer themes exclude the sidebar on post and static pages.

Jeroen
 
Adeptris

Posted: 1/7/2010
Quote message 

Hi Jeroen,
For sitewide make sure that the code is in the following files:
archive.php
archives.php
page.php
single.php


The code:
</div>
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
</div>

David
 
Adeptris

Posted: 1/7/2010
Quote message 

As well as these two:
links.php
index.php

If you have comments enabled then it may have to go into comments.php as well, the good news is that the next release of Artisteer may support vertical page menus

David
 
Jeroen

Posted: 1/7/2010
Quote message 

Thank you for your support David,

Unfortunately it still doesn't work.

Those where already containing the code.
archive.php
archives.php
page.php
single.php
links.php
index.php

Only comments.php didn't contain the code until now. Do you know another solution or should I just wait for the next release of artisteer?

Kind regards,
Jeroen

btw. this is the code:

<?php get_header(); ?>
<div class="art-contentLayout">
<div class="art-content">

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$prev_link = get_previous_post_link('&laquo; %link');
$next_link = get_next_post_link('%link &raquo;');
?>
<?php if ($prev_link || $next_link): ?>
<div class="art-Post">
<div class="art-Post-body">
<div class="art-Post-inner art-article">

<div class="art-PostContent">

<div class="navigation">
<div class="alignleft"><?php echo $prev_link; ?></div>
<div class="alignright"><?php echo $next_link; ?></div>
</div>

</div>
<div class="cleared"></div>


</div>

<div class="cleared"></div>
</div>
</div>

<?php endif; ?>
<div class="art-Post">
<div class="art-Post-body">
<div class="art-Post-inner art-article">
<h2 class="art-PostHeader">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?>
</a>
</h2>
<div class="art-PostContent">

<?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
<?php if (is_page() or is_single()) wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

</div>
<div class="cleared"></div>
<?php $icons = array(); ?>
<?php if (!is_page()): ?><?php ob_start(); ?><?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && get_the_tags()): ?><?php ob_start(); ?><?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class="art-PostFooterIcons art-metadata-icons">
<?php echo implode(' | ', $icons); ?>

</div>
<?php endif; ?>

</div>

<div class="cleared"></div>
</div>
</div>

<?php comments_template(); ?>
<?php endwhile; ?>
<?php else: ?>
<h2 class="center"><?php _e('Sorry, no posts matched your criteria.', 'kubrick'); ?></h2>
<?php endif; ?>

</div>
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
</div>
<div class="cleared"></div>

<?php get_sidebar(); ?>


 
Adeptris

Posted: 1/7/2010
Quote message 

Jeroen,
I have just tested my custom three sidebar theme and they all show on all pages, with the sidebar code added.

http://digitalraindrops.net/demo/wordpress/theme_413

Are the pages show in the 'pages' widget and in 'sidebar 1', as they should appear, do you have a file "sidebar 1.php" in your theme?

David
 
Adeptris

Posted: 1/7/2010
Quote message 

Jeroen,
If you want you can zip up your theme and email it across, I will have a look on a local copy of WP.

david.cox@adeptris.com

David
 
Adeptris

Posted: 1/7/2010
Quote message 

Hi Jeroen,
The code <?php get_sidebar(); ?> should have been <?php get_footer(); ?>

I do not know where the get_sidebar() code came from, was that something you added, as this was after the sidebar1 include it may have been the problem, it seems to work when removed.

the comments.php did not require the sidebar code, and there was an extra php endif tag in the comments file, it seems to be ok on a local copy now.

David
david
 
jeroen

Posted: 1/7/2010
Quote message 

The problem is solved by David.

There was an bad php EndIf tag in the comments.php file.
The site is now running:

www.dingemansarchitectuur.nl

Regards,
Jeroen