surfsup74
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: posts_per_page is giving unreliable resultsThanks for the reply – however I am still having exactly the same problem. Most of the time I get 2 post (as I want) but sometimes I just get 1. So the loop appears to still be jumping the $do_not_duplicate post and displaying nothing in it’ place. I’ve read through the page you linked to (that was actually what I based my original loop on) but no joy… Could one of the other loops on the page be affecting it?
Forum: Plugins
In reply to: I need two search boxes. One for 'pages' one for 'posts'I found a solution here: return-true.com/2010/10/using-multiple-search-forms-in-wordpress/
Forum: Plugins
In reply to: [WP-Paginate] [Plugin: WP-Paginate] 404 errorSorry to keep adding to this question but i keep noticing more stuff that may help someone give me a solution.
When used in the ‘page’ template my breadcrumb on page2 is like this:
Home > Page-name > Page2
When I am on page2 using the code on a ‘cataegory’ template (where i get the 404) I get this in the breadcrumb:
Home > Page2
Forum: Plugins
In reply to: [WP-Paginate] [Plugin: WP-Paginate] 404 errorI have just copied the code posted previously into a ‘page’ template file and it works fine – except that the li items are not styled as they are when i view the pagination on a ‘category’ template file.
In the category template file the pagination looks fine (laid out in a row with first box blue) however the actual pagination does not work. Does this give any more clues as to why it doesn’t work (i get a 404) in ‘category’ template files?
Forum: Plugins
In reply to: AStickyPostOrderER not re-ordering sidebar list of posts.Sorry – I’ve not used pastebin before. The full snippet is here…
Forum: Plugins
In reply to: AStickyPostOrderER not re-ordering sidebar list of posts.I’m trying to order posts using AStickyPostOrderER. In my sidebar I have the following code (below) displaying only the posts of the category I’m currently viewing. The AStickyPostOrderER plugin is working on my category template (ie. the excerpts are being re-ordered as defined in the AStickyPostOrderER admin area), so I am thinking this piece of code is causing the sidebar list of posts not to re-order. Any suggestions?
<?php
if (is_single( )) {
$post_ID = $wp_query->posts[0]->ID;
$all_cats_of_post = get_the_category($post_ID);
$first_cat_ID = $all_cats_of_post[0]->cat_ID;
$first_cat_name = $all_cats_of_post[0]->cat_name;
?>
<h2><?php echo $first_cat_name; ?></h2>-
<?php global $post; $cat_posts = get_posts(‘numberposts=100&category=’.$first_cat_ID);
- “><?php the_title(); ?>
foreach($cat_posts as $post) : ?><?php endforeach; ?>
Sorted it – thanks for your help.
Does this look right? (it works)
<?php query_posts(‘category_name=events&posts_per_page=10&paged=’.$paged); ?>
<?php if(function_exists(‘wp_paginate’)) {
wp_paginate();
} ?>
<?php while (have_posts()) : the_post(); ?>
<h4>” href=”<?php the_permalink() ?>”><?php the_title(); ?></h4>
<?php the_excerpt(); ?>
<?php endwhile; ?>Wow – quick response – much appreciated…
So where in the example code I included do I put the example you directed me to please(below)? Also, in the example below what would YOUR-PARAMETERS be?
$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
query_posts(“YOUR-PARAMETERS&paged=$paged”);I’ve just taken the orderby=rand bit out and can now see that every page the pagination takes me to shows just the first set of 10 posts. If i have 50 posts the pagination creates 5 li items however every page shows the most recent 10?? (ie if I click number 2,3,4 or 5 I still see the most recent 10 – which I would expect to only see if I click number 1.