The loop: more posts than I want to fit on one page

You’re looking for one of two things: either paginate_links(), or the combination of next_posts_link() and previous_posts_link(). Both of these functions allow for “pagination”, or the ability to place links to more content than you’re displaying in a screenful. Google does this on the bottom of most pages, for example. Of the two methods I mentioned … Read more

In Loop Output Place Custom Field Content In Between Paragraphs

After researching this, here is what works for me: <?php $paragraphAfter= 1; //show box after selected paragraph $content = apply_filters(‘the_content’, get_the_content()); $content = explode(“</p>”, $content); for ($i = 0; $i <count($content); $i++) { if ($i == $paragraphAfter) { ?> <!– START OF BLOCKQUOTE –> stuff <!– END OF BLOCKQUOTE –> <?php } echo $content[$i] . … Read more

How do i use postMash to order posts in a custom loop?

That plugin is 3 years old. I’m not sure if it uses the menu_order column to set the order but if it does you can filter pre_get_posts or your custom query with: ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’ This would all have to be done before the $post object is added to the $events array … Read more

Custom loop by url

You can customise the loop query to get results based on a search term – with $s being the search term; <?php // Post Query $args=array( ‘s’ => $s, ); ?> <?php query_posts($args); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?>