I created a page template to let me show, for example, some images of coas of Canada. I put the following code. It works perfect because the php code extract in a table just only the data I want.
The problem is that the side bar cannot show me all the things i put as in the other pages. I do really cannot understand the reason why of this strange beahviour. The page is
http://www.charliegolf.it/personal/coas/canada. As you can see the side bar is different from
http://www.charliegolf.it/personal/coas
the same problem persist with the new style theme 3.0
:?:
Quote:
<?php
/*
Template Name: stati_canada
*/
?>
<?php get_header(); ?>
<div id="content">
<div id="contentleft">
<?php include(TEMPLATEPATH."/breadcrumb.php");?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<div class="date">
<?php the_time('F j, Y'); ?></p>
</div>
<?php the_content(__('Read more'));?><div style="clear:both;"></div>
<div class="postmeta">
Written by <?php the_author(); ?> · Filed Under <?php the_category(', ') ?><?php edit_post_link('(Edit)', '', ''); ?></p>
</div>
<!--
<?php trackback_rdf(); ?>
-->
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_carletto = "XX.XXX.XXX.XX";
$database_carletto = "SqlXXX";
$username_carletto = "SqlXXX";
$password_carletto = "XXX";
$carletto = mysql_pconnect($hostname_carletto, $username_carletto, $password_carletto) or trigger_error(mysql_error(),E_USER_ERROR);
?>
<?php
mysql_select_db($database_carletto, $carletto);
$query_province_canada = "SELECT * FROM province_canada";
$province_canada = mysql_query($query_province_canada, $carletto) or die(mysql_error());
$row_province_canada = mysql_fetch_assoc($province_canada);
$totalRows_province_canada = mysql_num_rows($province_canada);
?>
<table align="center" cellpadding="5" cellspacing="5">
<tr>
<?php
do { // horizontal looper
?>
<td><div align="center">[img]/wp-content/pix/thumbs/regioni/province_canada/tn_<?php echo $row_province_canada['provincia']; ?>.jpg[/img]" border="0"></div></td>
<?php
$row_province_canada = mysql_fetch_assoc($province_canada);
if (!isset($nested_province_canada)) {
$nested_province_canada= 1;
}
if (isset($row_province_canada) && is_array($row_province_canada) && $nested_province_canada++%4==0) {
echo "</tr><tr>";
}
} while ($row_province_canada); //end horizontal looper
?>
</tr>
</table>
</p>
<?php
mysql_free_result($province_canada);
?>
<?php endwhile; else: ?>
<?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
</div>
<?php include(TEMPLATEPATH."/sidebar.php");?>
</div>
<?php get_footer(); ?>
|