Bricks Builder Query Loop - Complete Guide with 7 Practical Examples

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น • 22

  • @FancyBricks
    @FancyBricks  ปีที่แล้ว +4

    Code for cross-sells:
    $current_product_id = get_the_ID();
    $crosssells = get_post_meta($current_product_id, '_crosssell_ids',true);
    return [
    'post_type' => 'product',
    'posts_per_page' => 3,
    'orderby' => 'menu_order title',
    'order' => 'ASC',
    'post__in' => $crosssells,
    ];

  • @stewartr7648
    @stewartr7648 ปีที่แล้ว

    Great tutorial. Thank you for taking the time to create it. I’ll use your examples to try and create a product category archive page that list products in the sub categories.

  • @keyanakroeker7455
    @keyanakroeker7455 7 หลายเดือนก่อน

    Thank you for this! This is exactly what I needed.

  • @JUMPBALL_BASKETBALL
    @JUMPBALL_BASKETBALL 3 หลายเดือนก่อน

    Good afternoon, need some help or advice.
    There are three types of CPTs on the site.
    First CPT: team (for example: team 1)
    Second CPT: team roster (for example: roster 23/24, roster 24/25)
    Third CPT: player (player 1).
    There are relationships between CPTs
    First relation: Team - lineup
    Second relation: Lineup - player (parent relation: team - lineup).
    Objective: on the team page display player cards with the possibility to select (tab or select) by rosters, for example: team 1 lineup 23/24 player cards.
    And any way to switch between the roster, thereby displaying the cards of players linked to these rosters.
    The site is made on Bricks builder + jet engine and jet smart filters.
    I will be very grateful for any help, thanks.

  • @TheBukitStudio
    @TheBukitStudio 8 หลายเดือนก่อน

    Thank you so much! Working great! But, for upsells, it is showing the right type and amount of posts on the front but it displays ALL my products on the builder. Any idea?

    • @FancyBricks
      @FancyBricks  8 หลายเดือนก่อน

      You probably haven't set a product to preview in the template settings.

  • @Ppackard
    @Ppackard ปีที่แล้ว

    Thanks for the video! How would you do a query to display on sale woocommerce product that include variable products?

    • @FancyBricks
      @FancyBricks  ปีที่แล้ว +1

      This is a post for Fancy Bricks premium users fancybricks.co/on-sale-products-query-loop/

    • @Ppackard
      @Ppackard ปีที่แล้ว +1

      @@FancyBricks nice, thanks!

  • @groundpets5101
    @groundpets5101 8 หลายเดือนก่อน

    linking the querys when you press onto the electric bolt iron, are you using ACF getting the information across with acf? or this all just bricks?

    • @FancyBricks
      @FancyBricks  8 หลายเดือนก่อน +1

      It's all native, but the explanation also applies if you use ACF fields.

  • @groundpets5101
    @groundpets5101 8 หลายเดือนก่อน

    tab 1 build doing
    first part where you you div as a title then 2ed part you use pane same as the div, would i be able use both as a div? would it be less complicated easier to remember ?

    • @FancyBricks
      @FancyBricks  8 หลายเดือนก่อน +1

      Hi, I don't understand your question, if you mean the quey in DIVs, adding a query loop requires a container.

    • @groundpets5101
      @groundpets5101 8 หลายเดือนก่อน

      @@FancyBricks can i choose div or block dose it make any differences? as i was going do both div as they both use the same query to each other

    • @FancyBricks
      @FancyBricks  8 หลายเดือนก่อน +1

      Container, block and div, return a div in the html. The difference is that the block and container are already configured with display flex and the container with a max-width. The div element has nothing configured. You can use whichever one suits you best.

    • @groundpets5101
      @groundpets5101 8 หลายเดือนก่อน

      @@FancyBricks thanks

  • @Manolito-rh8dt
    @Manolito-rh8dt ปีที่แล้ว

    Wooow very helpful thx. I would like to create a LINK TREE for my archive, and when you click on a category, the current tag should be displayed, but the tree structure, i.e. the link structure, should remain and not disappear. What's the best way to do this? I want to do it like you, with main categories and subcategories.

    • @FancyBricks
      @FancyBricks  ปีที่แล้ว

      Do you mean something like this? fancyanimations.com/docs/install-the-plugin-and-activate-the-license/

    • @Manolito-rh8dt
      @Manolito-rh8dt ปีที่แล้ว

      @@FancyBricks
      Yes, exactly, just with subcategories.

    • @FancyBricks
      @FancyBricks  ปีที่แล้ว

      @@Manolito-rh8dt You must use the same template for the single post or archive in your case, this way you will give the impression that you are browsing through the tabs.

  • @KeshavDaBhutra
    @KeshavDaBhutra 2 หลายเดือนก่อน

    Please add timestamp

  • @KeshavDaBhutra
    @KeshavDaBhutra 2 หลายเดือนก่อน

    Please add timestamp