Forums

Related posts and popular posts not showing up in dedicated columns... (1 post)

  1. imthejason
    Member
    Posted 1 year ago #

    My site:
    http://www.inshoreinformer.com

    My issue is on the posts pages. I purchased this theme and as you can see, it has two dedicated columns on the single post page called "Related Posts" and "Popular Posts".

    I've made quite a few modifications to the theme, but nonetheless, neither of these columns have worked from the beginning.

    The related posts page is pulling info in from YARPP, which I have installed, but evidently not correctly configured or referenced somehow.

    Here's the code for these two columns from my single.php page:
    <!--/box -->
    <div class="box post-rel">
    <div class="content border">
    <div class="subcols">
    <div class="col1">
    <h2>Related Posts</h2>
    <?php
    $results = $wpdb->get_results(yarpp_sql(array('post'),array()));
    foreach ( (array) $results as $_post ) :
    $_post = get_post($_post->ID); ?>
    <div class="th fl">ID); ?>"><img src="<?php echo get_post_meta($_post->ID, 'post-img', true); ?>" alt="" /></div>
    <div>ID); ?>"><?php echo $_post->post_title; ?></div>
    <div class="hl2"></div>
    <?php endforeach; ?>
    </div>
    <!--/col1 -->
    <div class="col2">
    <h2>Popular Posts</h2>
    <?php
    foreach ( (array) taccess_popular_posts() as $_post ) : ?>
    <div class="th fl">ID); ?>"><img src="<?php echo get_post_meta($_post->ID, 'post-img', true); ?>" alt="" /></div>
    <div>ID); ?>"><?php echo $_post->post_title; ?></div>
    <div class="hl2"></div>
    <?php endforeach; ?>
    </div>
    <!--/col1 -->
    </div>
    <div class="clr"></div>
    <!--/subcols -->
    </div>
    <!--/content -->
    </div>
    <!--/box -->

Topic Closed

This topic has been closed to new replies.

About this Topic