Community Forums › Forums › Archived Forums › General Discussion › Balance theme Grid Exclude Category
- This topic has 19 replies, 2 voices, and was last updated 11 years, 6 months ago by Brad Dalton.
-
AuthorPosts
-
June 6, 2013 at 12:04 pm #44376etchatticMember
Hi there
I'm trying to exclude 4 category's from the balance theme homepage grid.
Any snippets available?
Craig
June 6, 2013 at 12:08 pm #44378Brad DaltonParticipantJune 6, 2013 at 12:31 pm #44386etchatticMemberSimply Exclude didn't work.
I've tried stopping the category by adding the // exclude posts from this category// ( the code not the words in brackets ) in the homepage loop.
Never had this problem before.
Thanks
Craig
June 6, 2013 at 12:35 pm #44389Brad DaltonParticipantTry this:
Code not displaying? grab it on Github.
You can add a comma separated list of category I.d's.
June 6, 2013 at 1:02 pm #44396etchatticMemberHey Bill
I see that. I'm trying to use the same grid that the balance theme uses.
This is my home.php code you'll see the exclude category I tried to use. https://gist.github.com/thewebattic/5723987
I did try add the function you showed above but nothing happened again.
Thanks for the help so far
Craig
June 7, 2013 at 2:34 am #44480etchatticMemberHey still no joy here.
Also noticed that when I page through from the home page pagination it go's back to the home page ??
Any more advice would be appreciated
June 7, 2013 at 3:06 am #44483Brad DaltonParticipantThis code has been tested on the Balance child theme and works.
Please remove this code from your home.php file
'category__not_in' => -13, // exclude posts from this category
Then paste this code at the end of your child themes functions.php file.
Code not displaying? Grab it from Github.
Please replace the 4 category i.d's in the code with the i.d's for the categories you want to exclude posts from displaying in.
This code removes all posts assigned to 4 categories from displaying on your home page if its set to display your latest posts. The code also excludes posts from those 4 categories from displaying in paginated pages linked to the home page.
Example: page 1,2,3 etc.
June 7, 2013 at 7:11 am #44513etchatticMemberHey Bill
I added that code still no luck even tried installing the original functions.php file and home.php and the grid still shows the the category I'm trying to exclude category-13 and reloads the home page for the pagination links.
With that in mind do you think it's possible I have settings in the Dashboard area that are conflicting with the code??
Craig
Link to the homepage http://sdesign.evokemedia.ca/wp2/
June 7, 2013 at 8:12 am #44526Brad DaltonParticipantPlease send me your login details for cPanel and WordPress and i'll take a look and fix it for you.
I have tested the code on your theme locally and i know it works but would like to help you resolve this quickly.
June 7, 2013 at 8:22 am #44532etchatticMemberThis reply has been marked as private.June 7, 2013 at 12:52 pm #44603etchatticMemberHey Brad did you get my details.
I'll never call you bill again lol !
Craig
June 7, 2013 at 1:20 pm #44619Brad DaltonParticipantHey Craig
Please send to [email protected]
Cannot for some reason read the private messages from anyone.
No worries about the name.
June 10, 2013 at 9:29 am #45040etchatticMemberHey brad I forwarded on my details yesterday by email.
Let me know if you got them
Thanks
Craig
June 10, 2013 at 9:31 am #45043Brad DaltonParticipantJune 10, 2013 at 10:04 am #45049etchatticMemberI just resent the details now.
PS I also just received a failure notice for the first mail I sent
his is an automatically generated Delivery Status Notification
THIS IS A WARNING MESSAGE ONLY.
YOU DO NOT NEED TO RESEND YOUR MESSAGE.
Delivery to the following recipient has been delayed:
Message will be retried for 2 more day(s)
Catch you later
Craig
June 10, 2013 at 10:26 am #45060Brad DaltonParticipantBecause mine is .net not .com
Which categories do you want to exclude?
June 10, 2013 at 12:47 pm #45093etchatticMemberHey Brad I tried it on a top level domain no joy.
Do you know what version of wordpress the test site you got it to work on had ??? I'm just trying to eliminate wether the issue is with the grid and the latest wordpress update.
Thanks
Craig
June 10, 2013 at 12:53 pm #45097Brad DaltonParticipantJune 11, 2013 at 11:21 am #45306etchatticMemberOk For anyone having this same issue.
I found the bug. I have featured post widgets in the sidebar that seem to overide the Grid settings on the homepage. No where else but on the homepage. So if my featured posts widget selects a category the grid automaitcally takes on that cat even if I exclude it. from the grid
Happy unbugging
Craig
June 11, 2013 at 11:35 am #45309Brad DaltonParticipant -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.