WordPress.org

Ready to get started?Download WordPress

Forums

Ajaxize
[resolved] ajax sidebar.php to refresh the main video only (2 posts)

  1. radiofranky
    Member
    Posted 2 years ago #

    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="http://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

    http://wordpress.org/extend/plugins/ajaxize/

  2. yoav.aner
    Member
    Plugin Author

    Posted 2 years ago #

    Hi radiofranky,

    I'm not entirely sure, but sounds like ajaxize won't help you out of the box. However, have a look at the code 2046 pasted, which seems to do something similar. http://wordpress.org/support/topic/plugin-ajaxize-call-function-onclick?replies=5#post-2263811

    Looks like in this case you can't get away from doing at least some javascript coding/customization.

    Yoav

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags