howudoin09
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: NextPage (Pagination) not working in wordpress 3.0.1This is a known bug with WordPress 3.0, and there is a bug fix logged in the Trac database, found here:
http://core.trac.wordpress.org/ticket/13471As a temporary and immediate fix on my site, we made a very small change to the post-template.php file in the wp-includes directory.
You need to replace line 622, which currently looks like this:
$output .= ‘‘;With:
$output .= ‘‘;THEN, also replace line 636 in exactly the same way, replacing:
$output .= ‘‘;With:
$output .= ‘‘;It should work fine after this fix.
heygaryc, you are a genius!!!
This fix works just fine.
I was wondering is there a permanent fix to this solution, maybe some plugin or something, which will make work easy rather than changing the code every time I install a new blog.
Thanks Again
BhupinderForum: Fixing WordPress
In reply to: NextPage (Pagination) not working in wordpress 3.0.1Can anybody please help….I’ve posted the code above
I say again, this page, is a post NOT a page.
Thanks in advance
BhupinderForum: Fixing WordPress
In reply to: NextPage (Pagination) not working in wordpress 3.0.1OK, the wordpress file that the page http://www.readclassics.net/browse-by-title-j/jack-by-title-j/chapter-9-parva-domus-magna-quies.php, uses is index.php, since it’s a post page.
Here’s the code for the same:
[Code moderated as per the Forum Rules. Please use the pastebin]
Thanks for your help
BhupinderForum: Fixing WordPress
In reply to: NextPage (Pagination) not working in wordpress 3.0.1By “relevant template file” do you mean index.php file from within the wordpress admin panel?
Thanks in advance
BhupinderForum: Fixing WordPress
In reply to: NextPage (Pagination) not working in wordpress 3.0.1I guess I’m not techie enough to know as to what exactly is “custom query”.
This theme is the free revolution theme that I customized heavily to give this final appearance.Also, this problem only occurred after I upgraded to WP 3.0.1
Thanks in advance
BhupinderOK, the problem is solved now!
I was not thinking that since I’m already on the category page, there is no need for the code in the ELSE loop. Infact the same is accomplished by using standard functions such as
<?php if (is_category()) { $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != "") { echo nl2br(""); echo"<ul>"; echo nl2br(""); echo nl2br(""); wp_list_categories('orderby=name&depth=1&show_count=0&title_li=&use_desc_for_title=0&child_of='.$this_category->cat_ID); echo"</ul>"; } else{ ?> <ul> <p></p> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink();?>"><?php the_title(); ?></a></li> <?php endwhile; else: ?> <br /><p><?php _e('Sorry, nothing available for this criteria.'); ?></p> <?php endif; ?> </ul> <?php } } ?>i think you misplaced the }.
the else should be work for the second IF..Thanks for the correction. Now I’m using the following code:
<?php if (is_category()) { $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != "") { echo "<ul>"; wp_list_categories('orderby=id&depth=1&show_count= 0&title_li= &use_desc_for_title=1&child_of='.$this_category->cat_ID); echo "</ul>"; } else{ ?> <ul> <?php $post; $myposts = get_posts('category=.$this_category->cat_ID&numberposts=5&order=desc'); foreach ($myposts as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink();?>"><?php the_title(); ?></a></li> <?php endforeach; ?> </ul> <?php } } ?>Now the problem is that :
When I click on a sub category then I get Titles of all posts, whether they are posted under that sub- category or not!
That’s quite strange and I wonder what exactly is the logical error in my code?
Any pointers?
Thanks in advance
Bhupinder