Balance theme Grid Exclude Category

Community Forums Forums General Discussion Balance theme Grid Exclude Category

This topic is: not resolved

Tagged: ,

This topic contains 19 replies, has 2 voices, and was last updated by  braddalton 1 year, 4 months ago.

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #44376

    etchattic
    Participant
    Post count: 31

    Hi there

     

    I’m trying to exclude 4 category’s from the balance theme homepage grid.

    Any snippets available?

     

    Craig

    #44378

    braddalton
    Participant
    Post count: 10217
    #44386

    etchattic
    Participant
    Post count: 31

    Simply 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

    #44389

    braddalton
    Participant
    Post count: 10217

    Try this:

    Code not displaying? grab it on Github.

    You can add a comma separated list of category I.d’s.


    #44396

    etchattic
    Participant
    Post count: 31

    Hey 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

     

    #44480

    etchattic
    Participant
    Post count: 31

    Hey 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

    #44483

    braddalton
    Participant
    Post count: 10217

    This code has been tested on the Balance child theme and works.

    Please remove this code from your home.php file
    [php]
    ‘category__not_in’ => -13, // exclude posts from this category
    [/php]

    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.


    #44513

    etchattic
    Participant
    Post count: 31

    Hey 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/

    #44526

    braddalton
    Participant
    Post count: 10217

    Please 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.


    #44532

    etchattic
    Participant
    Post count: 31
    This reply has been marked as private.
    #44603

    etchattic
    Participant
    Post count: 31

    Hey Brad did you get my details.

     

    I’ll never call you bill again lol !

    Craig

    #44619

    braddalton
    Participant
    Post count: 10217

    Hey Craig

    Please send to brad@wpsites.net

    Cannot for some reason read the private messages from anyone.

    No worries about the name.


    #45040

    etchattic
    Participant
    Post count: 31

    Hey brad I forwarded on my details yesterday by email.

    Let me know if you got them

    Thanks

    Craig

    #45043

    braddalton
    Participant
    Post count: 10217
    #45049

    etchattic
    Participant
    Post count: 31

    I 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:

    brad@wpsites.com

    Message will be retried for 2 more day(s)

     

    Catch you later

    Craig

Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic.