751 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
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/

964 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $10,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
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

709 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+2 more
ChillThemes says
2541 posts
  • Has referred 10+ members
  • Has sold $100+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in United States
+9 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
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
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
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
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
  • Has been part of the Envato Community for over 6 years
  • Has sold $5,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by