751 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
CyberShot says

I have a site

http://www.mtscottchog.org

You may recognize it, it’s a theme purchased here. It is working great, they love the site. My problem is this. Three of the people at the church wanted to have their own blogs. So I set up categories for them and then made a custom page for them. The pages are working fine. The issue is that I don’t believe all the code is working. For example. One of the blogs has 15 posts in it. I had the admin area set to display 10, yet only 5 displayed. Also, there is no navigation at the bottom to view older or newer posts even though he has enough posts to trigger this. Here is my code

http://pastie.org/596807

The blog I am speaking about is here

http://www.mtscottchog.org/ministries/adults/sunday-morning/sunday-morning/

962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says

First off, why are you messing with the code, why not just use the category for their ‘blog’ or filter it by author. Am I missing something here?

Your code is ‘wrong’ – You should use query_posts() instead and you have to add some more code to get the pagination working.

Example:

<?php $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; ?> <?php query_posts(“showposts=20&cat=15&paged=$paged”); ?>

Hope that helps

707 posts
  • Sold between 10 000 and 50 000 dollars
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
  • Exclusive Author
  • Envato Studio (Microlancer) Beta Tester
ChillThemes says
2541 posts
  • United States
  • Attended a Community Meetup
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Has been a member for 5-6 years
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
+4 more
CreatingDrew says
I recommend using WP_Query instead. http://weblogtoolscollection.com/archives/2008/04/13/define-your-own-wordpress-loop-using-wp_query/
Came here to say just that. Using the a WP_Query object makes custom loops really simple and customizable.
751 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
CyberShot says

well, I am messing with the code because I can. It’s how we learn. I don’t remember why the site was set up the way it is. It was set up a while ago. I am sure I had my reason for doing it. Probably because it makes it easier to show the page. The code is made up of a custom page and then each blogger can post to a specific category that goes to that page. It works, it’s just not completly correct as you all already know. I will look into query_posts. Thanks for the links and the example.

751 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
CyberShot says

well none of those options worked for me. The only way I can get it to display any posts at all is to use the code that I am using now. Nothing else has worked. I have been trying for hours with no success.

159 posts
  • Bought between 1 and 9 items
  • Europe
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 5 000 and 10 000 dollars
peex says

- Make a file for each 3 category using their ID’s. Like this: category-1.php, category-2.php, category-3.php

- Then make your custom adjustments for them. That’s all. And use default wordpress loop instead of your custom “foreach” one.

by
by
by
by
by
by