Wordpress Code Help.. I Have No Idea What They Did $5 Paypal To Whoever Fixes This.

contract

::\\\ Motivªtion ///::
Dec 28, 2011
1,918
33
0
California, USA
Trying to exclude certain categories from the homepage. Now BlogHue's awesome code worked fine, but then they added in another index for a new section on my site, and it doesn't work anymore.. And they can't fix it.. And somehow I have 2 indexes..

So I'm looking at the Index loop now: (This is what I want to do) I'm assuming it will work? Since the functions.php version didn't.

Show Posts From Selected Categories On Wordpress Blog Homepage

Index

<?php $i=1; if (have_posts()) : ?>
Index1

<?php $i=1; if (have_posts()) : ?>

<?php $category_id = get_cat_ID( 'Weight Loss' ); //echo $category_id ; ?>
But! That site says it should look like this:

<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
And then modified to this:

<?php if (!is_paged() and is_home()) { query_posts('cat=519,186,2'); wp_reset_query();

So what is that $i=1 for? It's written all over the code in the indexes in random sections.. God damn, so frustrated.. All I want to do is exclude certain cats from my homepage..
 


I don't know how to make it more clear? Change your queries to exclude the categories you want to exclude, query_posts('cat=-1,-2') is an example of excluding cat 1 & 2.
 
I don't know how to make it more clear? Change your queries to exclude the categories you want to exclude, query_posts('cat=-1,-2') is an example of excluding cat 1 & 2.

Yes I completely understand that.. But sorry, what I'm worried about is that $i=1 part. How do I write this up with the $i=1 included, since the website's code looks different than mine? Would be really grateful if you could send me an example with the $1=1 included..

Let's say my excluded cats where 1 and 2.. Where would I even add that query line in at? Thanks sorry!
 
Why are you getting hung up on a variable that isn't being referenced in your query? If you want to exclude categories, do so, and ignore the superfluous crap.
 
If you still haven't figured it out, PM me or Skype me. I'll take a look at it if you want.
 
Why are you getting hung up on a variable that isn't being referenced in your query? If you want to exclude categories, do so, and ignore the superfluous crap.

Finally had someone on another forum explain that the $i=1 variable doesn't matter.. I had no idea. So sorry! Now I kind of understand what you're saying by it's only the post_query part I have to care about.
 
Didn't mean to bump*. Sorry

Just wanted to say MY coders broke it, NOT bloghue. He actually helped me fix their issues with some code provided in another thread. :) Everything's going great now.