Dead Simple Way to Exclude Items From Query Loops in Bricks Builder (Meta Queries!)

Поділитися
Вставка
  • Опубліковано 21 гру 2024

КОМЕНТАРІ • 104

  • @mr.matt.eastwood
    @mr.matt.eastwood 11 місяців тому +8

    Yes! Another gold nugget. Makes me wonder whether you'd consider making a video explaining how meta queries work in general? It's one aspect of query loops that I still struggle with. I feel like I'm getting the basic idea, but I haven't yet wrapped my head around the whole picture. Would love a tutorial.

    • @kristapsvilcans
      @kristapsvilcans 11 місяців тому +3

      I would also love to see Kevin's video on Query loop, Taxonomy query and Meta query, proper use of Custom fields and post types. When to use it, in what cases not to use it, because I think that I am trying to use query loop everywhere now, which ends up being too complicated, because there are too many post types and perhaps it is wrong because You can't find what You want to change/add new stuff/take off.

    • @sophiemulders
      @sophiemulders 9 місяців тому

      I did not know what meta query was until he showed me here.

  • @old_ogcdigital
    @old_ogcdigital 11 місяців тому +7

    Saving queries similarly to classes would be a fantastic addition!

    • @WolfStackAUS
      @WolfStackAUS 11 місяців тому +1

      JetEngine does this with the query builder 👌👍
      Edit: you can just reference the query from the Bricks query builder. Super useful

    • @old_ogcdigital
      @old_ogcdigital 11 місяців тому +1

      @@WolfStackAUS Yeah, but... crocoblock.

    • @iservisat
      @iservisat 9 місяців тому

      Look up Advanced Themer, it has and its amazing

  • @MicahChoquette
    @MicahChoquette 10 місяців тому

    This is mind-blowing. I'm not new to WP but still new to Bricks. Everytime I watch something lately, it proves I made the right move by making the switch.

  • @RobCooper
    @RobCooper 4 місяці тому

    OH BRILLIANT! a custom field group for "visibility" alone. Before starting with Bricks, ACSS, Frames and ACF (actual hands on), I watched and learned. I got to know what was possible, knowing I could come back and get the details on how. This allowed me to design the structure and functionality ahead of time, knowing X was possible. Now that I'm 2 weeks into the new software, I'm back to add the functionality. It's been a fascinating 2 weeks now that I'm hands on.

  • @stevebaker2896
    @stevebaker2896 11 місяців тому +6

    Good stuff but... is it not better to have the loop control as a custom taxonomy rather than a custom field? Querying by custom fields is not as performant as querying by taxonomy. And 'Don't show in Loops' definitely seems like a 'category' type thing (that multiple posts might belong to) rather than a custom field that is best used for displaying unique information. Querying by taxonomy makes for a faster site when you are dealing with lots of posts. A single term taxonomy can be queried super fast as you don't even need to check against a specific term, you can just check whether the post contains data (any data) for that taxonomy or if it's empty.

    • @Gearyco
      @Gearyco  11 місяців тому +2

      I don’t see it as a taxonomy. Not worried about performance unless it’s hundreds or thousands of items. This is a few items here and there - not used heavily.

  • @justinsideris
    @justinsideris 11 місяців тому

    Did my own version of this about a week ago, but I like your Meta queries explanation. I also think someone did a feature request in Bricks for a Copy/Paste Queries and Conditions but I like your presets idea more. Bricks probably needs both tbh. Thanks for the content Kevin!

  • @LegitDevWeb
    @LegitDevWeb 3 дні тому

    It's an amazing feature. Great tutorial.

  • @geremaurer1506
    @geremaurer1506 8 місяців тому

    I love working with CPT's and making it easier for customers. As of today, this step is also part of it.
    Thank you very much.

  • @davidwalls2304
    @davidwalls2304 11 місяців тому

    Kevin, this is a GREAT video to help in the situations you described. I first thought, oh just exclude from the query loop but then as you described potentially how often a loop might exist and this suggested approach, I was like "Duh, of course do it this way, this makes total sense." The Gold Nuggets continue.

  • @lmsbolt
    @lmsbolt 9 місяців тому

    This has opened my mind to countless possibilities of where to implement this behavior...thank you sir!

  • @MichaelOQuin-w9t
    @MichaelOQuin-w9t 11 місяців тому

    This is great. Not just the loop part but I just never thought of having multiple field groups attached to a post type. I have always did a one to one. You got my head spinning with some new ways to do things.

  • @mickt24
    @mickt24 7 місяців тому

    This has been super useful in loads of places! One question I can't get my head around is whether it's possible to meta query a related post that is switched off - in other words a post linked by an ACF relationship field that is hidden from loops.

  • @ManolisGerakakis
    @ManolisGerakakis 8 місяців тому

    Pure website maintainability gold! Thank you Kevin! Quick question. If you "turn off" the CPT from showing in the query loop but someone directly visits the page (since it is still published for SEO) , how would you programmatically display a "Not available" or "Coming soon" notice on the CPT's page?

  • @MarkDendy
    @MarkDendy 11 місяців тому

    Absolute gold Kevin! This is a very powerful solution using the Meta Query option 👍
    I spent yesterday afternoon setting up conditions for the Hero section of a site I'm currently building so the client can control everything from ACF fields.
    This tutorial has opened my mind even more to other possibilities, thanks for sharing! Love your work!

  • @stphnmwlkr
    @stphnmwlkr 11 місяців тому

    Great tips. I didn’t know there was another way, this is how I have always approached hiding content. I never realized there was an “Is Null” option… spent too much time going back and resaving the content so thank you for that nugget.

  • @vishalsahi3832
    @vishalsahi3832 11 місяців тому

    Your excellent tutorials have become my addiction. Thank you, dear.. ❤🙏

  • @AmandaLucaseu
    @AmandaLucaseu 11 місяців тому

    Excellent tutorial - definitely agree having preset queries would be fantastic

  • @davidnickson5043
    @davidnickson5043 11 місяців тому

    I’ve always wondered what those meta fields are for… Thanks Kevin!

  • @dahunsi
    @dahunsi 6 місяців тому

    I think that query preset is available in Advanced Themer

  • @ReubenHochstetler
    @ReubenHochstetler 11 місяців тому

    Kevin, you never disappoint. Great forward thinking for scalable and maintainable websites.

  • @Jim.Hummel
    @Jim.Hummel 11 місяців тому

    You’ve got styling classes, pseudo classes…so loop classes makes perfect sense!!

  • @pixelnthings
    @pixelnthings 11 місяців тому

    This content shouldn't be free..Hats off Kevin 👏👏👏

  • @maksymdavydchuk
    @maksymdavydchuk 10 місяців тому

    Thank you for this video, Kevin. I think we can exclude these items using the functions.php file and write some code there. I this case we won't have to change the conditions in each loop builder.

  • @RiyazShihabdeen
    @RiyazShihabdeen 11 місяців тому

    Wow Kevin, mind blowing. This is a fantastic trick to exclude posts in a loop. Really learnt a very valuable thing today. Hats off to you. 👍🙏

  • @ceesvanstam1963
    @ceesvanstam1963 11 місяців тому

    Great. Just working on it for a client with an equivalent request. Was already working on metadata. But this is the solution.

  • @chamika1975
    @chamika1975 11 місяців тому

    Thank you very much Kevin. Great video again. Can you also do a tutorial on Single, Archive, & category template creation video for a blog. I am trying to create a blog page my portfolio website and also want to create a blog website for myself. Watched some videos but did not work out somehow. Struggling to find good tutorial for a blog using Bricks Builder. Others' videos are confusing to me. Much appreciated if you could do a blog website tutorial.

  • @emadhosen
    @emadhosen 11 місяців тому

    Thank yu Kevin for another wonderful tutorial (Simple Way to Exclude Items From Query Loops in Bricks Builder).

  • @martinboisclair4104
    @martinboisclair4104 11 місяців тому

    Cool Kevin, I think you can do the same with a switch and a condition bricks on the loop item more simple. If it possible?

    • @Gearyco
      @Gearyco  11 місяців тому

      Isn’t that what I showed?

  • @MoxetKhanPK
    @MoxetKhanPK 11 місяців тому

    Hey Kevin, thanks for sharing the logic. I usually use Taxonomy for such purpose in JetEngine, mind sharing your views on why we should use meta field over taxonomy?

    • @Gearyco
      @Gearyco  10 місяців тому

      You can use taxonomy if you prefer it.

  • @mugurbaloiu2270
    @mugurbaloiu2270 11 місяців тому

    Great help Kevin! I'll just go update some of my queries right now

  • @jnslzr
    @jnslzr 11 місяців тому

    Im yet to get here (still on L12) but really enjoying this content, thanks!

  • @cabolove89
    @cabolove89 11 місяців тому

    Hello Kevin
    I've been following your channel since the beginning with oxygen builder tutorials. Believe me, I learned a lot and I'm still learning. You are creating a monster in development in wordpress :)
    I want to thank you for your work and dedication in transmitting your knowledge.
    Finally, I challenge you to make this calendar, which is really cool. to see how to make the relationship in the ACF.
    with love from Cape Verde

  • @dallaslogic
    @dallaslogic 11 місяців тому

    Totally snagging this for future builds!

  • @ernestoserrathmontecino8914
    @ernestoserrathmontecino8914 11 місяців тому

    This really good approach, thanks for this video.

  • @winwinis3483
    @winwinis3483 11 місяців тому

    Thanks so much, as usual a great tutorial - and timing perfect for me!

  • @PswACC
    @PswACC 5 місяців тому

    13:55 I Looked in the Bricks Forum and didn't see your feature request. Any update on Bricks implementing this Query Preset saving feature?

  • @lucasandersson5395
    @lucasandersson5395 10 місяців тому

    Really good video, thanks Kevin.

  • @simonkerridge
    @simonkerridge 11 місяців тому

    Brilliant! 👍 Info like this is so valuable.

  • @osvaldoodon
    @osvaldoodon 11 місяців тому

    Great video. But I don't agree with the conditions ui. Would be better to have key > condition > value on each condition before the operator.

    • @Gearyco
      @Gearyco  11 місяців тому +1

      I agree, the ui can be improved here.

  • @Hassan_Nader
    @Hassan_Nader 11 місяців тому

    Genius method... A lot of thanks

  • @abdulwaheedorg
    @abdulwaheedorg 11 місяців тому

    I'll definately build that logic in all of my websites

  • @bluetheredpanda
    @bluetheredpanda 11 місяців тому

    Great video as always, thanks Kevin!
    *QUESTION:*
    My understanding is, custom fields aren't very efficient when it comes to queries. Wouldn't it be a better approach to create this on/off state machine as a taxonomy?
    Would love to hear your thoughts on this

    • @Gearyco
      @Gearyco  11 місяців тому +1

      If you need to hide lots of posts for some reason, then a taxonomy is better. I’ve never needed it for more than a few at a time.

    • @bluetheredpanda
      @bluetheredpanda 11 місяців тому

      Makes sense. Thanks! @@Gearyco

  • @danielaldea
    @danielaldea 11 місяців тому

    It's a good approach for this specific need. But at the same time you could have different pages with different logic on wich one to hide, so it's not absolutelly wrong the bricks query exclusion way. I'm with you that in this time is better your way, but not always.
    By the way, is not a critique, I love your videos and learnt a lot with you. Just wanted to say is one more excellent options, but not THE option.

  • @ST-rq8jw
    @ST-rq8jw 11 місяців тому

    Awesome man!!,, more ACF please 🙏🏻

  • @MichelMoraes-g6u
    @MichelMoraes-g6u 10 місяців тому

    Hi Kevin, May I know what software you use to record this video? Thank you!

    • @Gearyco
      @Gearyco  10 місяців тому

      Ecamm live

    • @MichelMoraes-g6u
      @MichelMoraes-g6u 10 місяців тому

      @@Gearyco Thanks. Congrats on your work.

  • @emadhosen
    @emadhosen 11 місяців тому

    Is this possible by using MetaBox?

  • @stripedgoat
    @stripedgoat 11 місяців тому

    Brilliant, as always! Thanks Kevin!! 👊🏼

  • @fremo-d
    @fremo-d 11 місяців тому

    Great feature Kevin, thanks a lot ! 💪🏻

    • @Gearyco
      @Gearyco  11 місяців тому +1

      You bet!

    • @fremo-d
      @fremo-d 11 місяців тому

      @@Gearyco Already added to all my Blueprints 😉

  • @ernestoserrathmontecino8914
    @ernestoserrathmontecino8914 11 місяців тому

    I think this would be a good thing to setup up in the blue print. or what do you think?

  • @Sprnrml
    @Sprnrml 10 місяців тому

    Hi Kevin, I tried implementing this on my search page, but somehow it doesn't work on a search query...

    • @Gearyco
      @Gearyco  10 місяців тому

      Hmm. Maybe ask for help in the inner circle?

  • @mnhalrj
    @mnhalrj 10 місяців тому

    Many Thanks Kevin

  • @danstevens1974
    @danstevens1974 11 місяців тому

    Excellent tip! Thanks!

  • @Kh4N
    @Kh4N 10 місяців тому

    Damn, nice! Golden nugget time again 🤗

  • @dariengibson
    @dariengibson 11 місяців тому

    You're a legend

  • @computergrej
    @computergrej 5 місяців тому

    Why not just change the status of the post to draft?

    • @Gearyco
      @Gearyco  5 місяців тому

      Because then it doesn’t exist. This is for cases where you need the post to exist, just not show in the loop.

  • @davispe
    @davispe 11 місяців тому

    How about instead of not displaying the "course", it adds a currently closed or unavailable banner to it?

    • @Gearyco
      @Gearyco  11 місяців тому

      That’s always possible, but this tutorial is about how to hide things. The class schedule thing was just a random example to have something to use.

    • @WolfStackAUS
      @WolfStackAUS 11 місяців тому +1

      That would be cool. Maybe you could use the Boolean logic to add a class name to a banner block. Hide by default but display if true

  • @John.Rearden
    @John.Rearden 11 місяців тому

    Good content.

  • @MrMrTyree
    @MrMrTyree 11 місяців тому

    Jet Engine offers presets I beleive. It's done pretty well last time I checked

  • @uspaeker
    @uspaeker 11 місяців тому

    Great. More of this...

    • @Gearyco
      @Gearyco  11 місяців тому +1

      Always more coming!

  • @StnurTube
    @StnurTube 11 місяців тому

    Super! Thanks!

  • @AndreSalata
    @AndreSalata 10 місяців тому

    Query presets +1

  • @rishabhagarwal8594
    @rishabhagarwal8594 11 місяців тому

    🙏🙏

  • @RobCooper
    @RobCooper 4 місяці тому

    People that delete content because it's temporarily available, or switch to draft, drive me crazy. NEVER delete data. Links were built to that content. Google has indexed the content. Just set a flag on the page that says "not currently available" or whatever.

  • @superchaqueta3253
    @superchaqueta3253 11 місяців тому

    Saving queries will change many lives hahaha, even in oxygen

  • @markjszymanski
    @markjszymanski 11 місяців тому +1

    Bricks needs an option for reusable queries like crocoblock has

    • @WolfStackAUS
      @WolfStackAUS 11 місяців тому

      You can use the query builder with bricks though

    • @markjszymanski
      @markjszymanski 11 місяців тому

      @@WolfStackAUSThe Crocoblock query builder you mean? Can I use a crocoblock query in a native bricks query loop? as opposed to a croco lisitng grid

  • @MarcelHeiniger
    @MarcelHeiniger 11 місяців тому

    I hate your voice, but I have to admit, your content is consistently exceptional and truly valuable.

    • @Gearyco
      @Gearyco  11 місяців тому

      Why would you say that?

  • @vaughanprint
    @vaughanprint 11 місяців тому

    Class!… no, I mean loops… no… I'm confused… loops? Where? What? logic?
    Sounds like a cult.
    Is there some sort of inner circle?

    • @Gearyco
      @Gearyco  11 місяців тому +1

      Yes, but you have to do a human sacrifice before you’re allowed in.

    • @vaughanprint
      @vaughanprint 11 місяців тому

      @@Gearyco On it. Plenty of candidates to choose from.

    • @SteveDeakin
      @SteveDeakin 11 місяців тому

      How is Rob

    • @vaughanprint
      @vaughanprint 11 місяців тому

      🤫

    • @gerbenclub
      @gerbenclub 11 місяців тому +1

      Classes are courses of course, but you'll only understand if you're in the loop 😁

  • @Samanticsweb
    @Samanticsweb 9 місяців тому

    I just wish I had all your website related knowledge and experience

    • @Gearyco
      @Gearyco  9 місяців тому

      One day!