WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
Not working for Multi Site (1 post)

  1. enderpal444
    Member
    Posted 2 years ago #

    Ok so I read through some other threads and tried using "proper network activation" and I also tried activating it separately and nothing worked. For some reason also it not working is causing my div's under the loop to overlap the loop posts. Here's how it's implemented. Sorry for the long loop but I wanted to include everything.

    <?php

    $order = get_option(THEME_PREFIX . "show_post");
    $orderby = 'date';
    $orderby = '&orderby=date';
    if(isset($order) && !empty($order))
    {
    switch($order)
    {
    case 'rated' : $orderby = '&r_sortby=highest_rated&r_orderby=desc';
    break;
    case 'viewed' : $orderby = '&v_sortby=views&v_orderby=desc';
    break;
    case 'discussed' : $orderby = '&orderby=comment_count';
    function comment_count_orderby( $orderby ) {
    return "comment_count DESC";
    }
    add_filter('posts_orderby', 'comment_count_orderby');
    break;
    case 'rand' : $orderby = '&orderby=rand';
    break;
    case 'recent' : $orderby = '&orderby=date';
    break;
    default : $orderby = '&orderby=date';
    break;
    }
    }

    query_posts('category_name=uncategorized&showposts=3'.$query_string.'&r_sortby=highest_rated&r_orderby=desc');
    if (have_posts()) : ?>
    <?php $i=0; while (have_posts()) : the_post(); $i++; ?>

    <div class="postbox">
    <div class="boxtitle">
    <h2>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php echo tube_get_limited_string($post->post_title,26); ?></h2>

    </div>
    <div class="boxentry">
    " title="<?php the_title_attribute(); ?>">
    <?php $thumb = tube_getcustomfield('thumb',get_the_ID()); if(!empty($thumb)) { ?>
    <img src="<?php echo $thumb; ?>" alt="<?php the_title_attribute(); ?>" width="164" height="103" /> <?php } else { ?>
    <img src="<?php bloginfo('template_url') ?>/images/pic_post1.jpg" width="164" height="103" alt="image" /><?php } ?>

    </div>
    <div class="boxmetadata"><!--boxmetadata-->
    <div class="metalft">
    <span class="duration"><?php $duration = tube_getcustomfield('duration',get_the_ID()); if(empty($duration)) $duration = ' '; echo $duration; ?></span>
    <?php if(function_exists('the_views')) { ?><span class="views"><?php the_views(); ?></span><?php } ?>

    </div>
    <div class="metargt">
    <?php if(function_exists('the_ratings')) { ?><div class="rating"><?php echo the_ratings_results(get_the_id()); ?></div><?php } ?>
    </div>

    </div><!--boxmetadata-->
    </div>
    <?php if($i%3==0) : ?><div class="clear"></div><?php endif; ?>
    <?php endwhile; wp_reset_query(); ?>
    <?php
    $next_page = get_next_posts_link('Previous');
    $prev_pages = get_previous_posts_link('Next');
    if(!empty($next_page) || !empty($prev_pages)) :
    ?>
    <!-- navigation -->
    <div class="navigation">
    <?php if(!function_exists('wp_pagenavi')) : ?>
    <div class="alignleft"><?php echo $next_page; ?></div>
    <div class="alignright"><?php echo $prev_pages; ?></div>
    <?php else : wp_pagenavi(); endif; ?>
    </div>
    <!-- /navigation -->

    <?php endif; ?>

    <?php
    else :
    ?><p class="nopost">This week's submissions will be uploaded shortly.</p><?php
    endif;
    ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic