hi,
I’m trying to get my sidebar.php ajaxed so that everytime I click on link on sidebar.php the class in page.php will gets refreshed and not the sidebar.php.
I tried the hack but is not working. Could you please show me how to get sidebar.php ajaxed? Thanks
this is my code for sidebar.php
<h2>Related Videos</h2>
<div id="scroll-pane"> <div id="scroll-content">
<?php
$IDOutsideLoop = $post->ID;
while( have_posts() ) {
the_post();
foreach( ( get_the_category() ) as $category )
$my_query = new WP_Query('category_name=' . $category->category_nicename . '&orderby=date&order=desc&showposts=100');
if( $my_query ) {
while ( $my_query->have_posts() ) {
$my_query->the_post(); ?>
<div class="scroll-content-item">
<div class="singleright">
<div class="single_img_block_img"><div class="side_img_block"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php $vthumb = get_post_meta($post->ID, 'video_thumb', true); echo '<img src="https://i.ytimg.com/vi/'.$vthumb.'/default.jpg" width=96px height=72px/>';?></div></a></div>
<div class="singlerighti">
<div class="singlerightinfo">
<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php $tit = the_title('','',FALSE); echo substr($tit, 0, 150); if (strlen($tit) > 150) echo " ..."; ?></a>
</div>
<div class="postviews">
<?php if(!function_exists('easy_relative_date')){the_time('F jS, Y'); } else { echo easy_relative_date(get_the_time('U')); } ?>
</div>
<div class="postviews">
<?php if(function_exists('the_views')) { the_views(); } ?>
</div>
</div>
</div>
</div>
<?php
}
}
this is my single.php
<div class="singlebody">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="singlepost">
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<div class="pagenumbers"><?php wp_link_pages(array('before' => '<div class="font_normal">一共有: </div>','after' => '', 'next_or_number' => 'number')); ?><?php wp_link_pages(array('before' => '', 'next_or_number'=>'next', 'previouspagelink' => ' « Go Back ', 'nextpagelink'=>' Watch 下一個片段 » ')); ?>
</div>
<div class="postinformation">
<div class="single_postviews">
<?php if(function_exists('the_views')) { the_views(); } ?>
</div>
<p><font style="font-weight:bold;">Post Date: </font> <?php if(!function_exists('easy_relative_date')){the_time('F jS, Y'); } else { echo easy_relative_date(get_the_time('U')); } ?><br>
<font style="font-weight:bold;">Category: </font> <?php the_category(', ') ?><br>
<?php the_tags( '<font style="font-weight:bold;">Tags:</font> ', ', ', ''); ?></p>
</div>
<?php include (TEMPLATEPATH . '/sidebar_single.php'); ?>
</div>