heyindy
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Fixing WordPress
In reply to: Display specified pages using query_postsYou legend esmi, it would help if I just read a little bit more on the page I’m on!
Forum: Fixing WordPress
In reply to: Display specified pages using query_postsI know you can use
'pagename' => 'about'– note that this is not the page’s title, but the page’s pathBut I want to display four posts.
Forum: Fixing WordPress
In reply to: Help with multiple loops, WP_Query and while statement!I managed to resolve it…
by adding offset=1
<?php $my_query_england = new WP_Query('offset=1&category_name=England&posts_per_page=1'); while ($my_query_england->have_posts()) : $my_query_england->the_post(); ?>Forum: Fixing WordPress
In reply to: Using multiple loops on a tag.php or category.php pagethank you, I managed to get something working using the following:
<?php $current_tag = single_tag_title("", false);?> <?php $my_query = new WP_Query(array('showposts'=>'1','tag_slug__and'=>array($current_tag),) ); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <!-- do stuff --> <?php endwhile; ?> <?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?> <!-- do stuff --> <?php endwhile; ?>That’s obviously using 2 loops, but your method certainly sounds easier. I will look into it thanks so much
Forum: Themes and Templates
In reply to: Theme advice: How to build this ideaedit: “I really do hope I can explain myself…”
LOL… great start!
Viewing 5 replies - 1 through 5 (of 5 total)