Bricks Builder Query Loop - Complete Guide with 7 Practical Examples

Поделиться
HTML-код
  • Опубликовано: 16 окт 2023
  • Update: In the Query loop of categories and sub categories, to the main Query loop you must assign 0 to the parent field.
    In this tutorial I will solve the most frequent doubts about Query Loop in Bricks, you will learn how to use this tool with 7 practical exercises that you will use in most of your projects:
    Query loop in Tabs
    Query loop in Accordions
    Query loop in with Sub categories
    Query loop for Related posts/products
    Query loop for Featured Products
    Cross-Sell Query Loop
    Up-sell Query Loop
    Custom Query loop
    This video will be a bit long but it will solve all your doubts.
    👉Link for Custom Query. developer.wordpress.org/refer...
    📣 Join the Facebook Community: / fancybricks
    🤩 All Bricks templates: fancybricks.co/templates/
    🔥 Buy Fancy Bricks: fancybricks.co/early/

Комментарии • 19

  • @FancyBricks
    @FancyBricks  7 месяцев назад +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,
    ];

  • @keyanakroeker7455
    @keyanakroeker7455 26 дней назад

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

  • @stewartr7648
    @stewartr7648 7 месяцев назад

    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.

  • @TheBukitStudio
    @TheBukitStudio Месяц назад

    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  Месяц назад

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

  • @Xesca31
    @Xesca31 7 месяцев назад

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

    • @FancyBricks
      @FancyBricks  7 месяцев назад +1

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

    • @Xesca31
      @Xesca31 7 месяцев назад +1

      @@FancyBricks nice, thanks!

  • @groundpets5101
    @groundpets5101 2 месяца назад

    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  2 месяца назад +1

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

  • @Manolito-rh8dt
    @Manolito-rh8dt 7 месяцев назад

    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  7 месяцев назад

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

    • @Manolito-rh8dt
      @Manolito-rh8dt 7 месяцев назад

      @@FancyBricks
      Yes, exactly, just with subcategories.

    • @FancyBricks
      @FancyBricks  7 месяцев назад

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

  • @groundpets5101
    @groundpets5101 2 месяца назад

    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  2 месяца назад +1

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

    • @groundpets5101
      @groundpets5101 2 месяца назад

      @@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  2 месяца назад +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 2 месяца назад

      @@FancyBricks thanks