• Hey ppl,

    I have a tricky question where i could not find any solution using wordpress Codex.

    Anyway my problem is that a friend of mine has a blog. His first page is a page actually and not the latest posts he made.

    He wants me to make him a widget to show last post of some categories in a accordion Jquery menu.

    While it works, at the_title it loads the name of the page it is been displayed, and not the post name…

    So, i moved to the codex and at the loop, and tried to use the

    <?php $my_query = new WP_Query(‘category_name=special_cat&showposts=10’); ?>

    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <!– Do special_cat stuff… –>
    <?php endwhile; ?>

    where i load content for a category. BUT if i try to use it second time,copy paste it and change the category id, to parse one more category, it does not show anything it just plays the first category only.

    I have also tried to use the following code with or without the <?php rewind_posts(); ?>

    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <!– Do special_cat stuff… –>
    <?php endwhile; ?>

    Nothing i can get a solution…

    If u want to check the site, let me know ??

    Thanks for any help,
    Basilakis

Viewing 1 replies (of 1 total)
  • Thread Starter basilakis

    (@basilakis)

    I am even trying to implement it like that

    <div class=”arrowlistmenu”>
    <?php rewind_posts(); ?>
    <?php $my_query = new WP_Query(‘category_name=featured&showposts=3’); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <h3 class=”menuheader expandable”><?php the_title(); ?></h3>
    <ul class=”categoryitems”>
    ” title=”Permanent Link to <?php the_title(); ?>”>
    <?php the_title(); ?>

    <div class=”PostContent”>
    <?php
    global $more; // Declare global $more (before the loop).
    $more = 0; // Set (inside the loop) to display content above the more tag.
    the_content(“More…”);
    ?>

    </div>
    <?php endwhile;?>

    </div>

    but nothing…

Viewing 1 replies (of 1 total)
  • The topic ‘Many wordpress Queries with a page as index’ is closed to new replies.