[Plugin: Ajaxize] ajax sidebar.php to refresh the main video only
-
hi,
I was wondering if someone could help me figure this out. I have sidebar.php with all the related videos and single.php plays the main video. When someone clicks on “related videos” I would like to refresh only the main video info not the sidebar.php, header, and footer.this is the code i have for single.php `<?php get_header(); ?>
<div id=”content”>
<div class=”singlebody”>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class=”singlepost”>
<h2><?php the_title(); ?></h2>
<div class=”videogame”><?php if( get_post_meta($post->ID, “video”, true) ): ?>
<div class=”videopart”>`
this is what I have in sidebar.php
‘
<?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(); ?></p>
<p>” 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>
” title=”<?php the_title_attribute(); ?>”><?php $tit = the_title(”,”,FALSE); echo substr($tit, 0, 150); if (strlen($tit) > 150) echo ” …”; ?></p>
<p>’thanks
- The topic ‘[Plugin: Ajaxize] ajax sidebar.php to refresh the main video only’ is closed to new replies.