Support » Plugins and Hacks » Hacks » AStickyPostOrderER and wp_query

  • Hello,

    I am have been trying to solve this for the past week but I am not good enough 🙁

    I am trying to rewrite the following lines without the WP_query as explained in the AStickyPostOrderER page to fix the problem I have in my index.php

    Here is the code:

    <?php
    $the_id=0;
    $feat_query=new WP_Query('showposts=1&orderby=rand&category_name='.get_option('gp_rightcol_cat'));
    if($feat_query->have_posts()) : while($feat_query->have_posts()) : $feat_query->the_post(); $the_id=$post->ID;
    ?>
    <h2><?php the_category(', '); ?><i> - <?php the_time('j F, Y'); ?></i></h2>
    <h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
    <?php the_content('En lire plus...'); ?>
    <?php endwhile; endif; ?>

    Thanks for your help and sorry for my not so good english…

    Eric

  • The topic ‘AStickyPostOrderER and wp_query’ is closed to new replies.