Bricks Query Loop Cards with Hover Image

Bricks Query Loop Cards with Hover Image

Updated on 5 Nov 2024

This Pro tutorial shows how images uploaded to posts as the value of a 'Hover Image' field can be set to appear when the featured images in a Bricks posts query loop are hovered.

Step 1

[Optional] Let's register a new image size for the images.

Add the following in child theme's functions.php (w/o the opening PHP tag) or a code snippets plugin:

<?php 

add_image_size( 'project-image', 682, 430, true );

where project-image is your custom image size handle.

Step 2

Add a new field group for your post type having an image-type custom field named say hover_image.

Add/edit posts and set the hover image for each.

Step 3

Edit the single template for your post type with Bricks.

Copy the JSON of the fully-built Section from the link below and paste.

Note: ACSS classes are used.

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 558 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Centered Image Logo in Bricks

Centered Image Logo in Bricks

Updated on 8 Mar 2023 This Pro tutorial provides the steps to add a logo image as the center menu item that shrinks when the…
Categories:
Pro
Horizontal Scrolling Tabs in Bricks

Horizontal Scrolling Tabs in Bricks

Nestable Tabs element in Bricks wraps into multiple lines out of the box at smaller viewport widths. This Pro tutorial provides the steps to remove…
Categories:
Tags:
Download Area with HappyFiles

Download Area with HappyFiles

Aside from the series I'm currently writing on how to create custom galleries and sliders with HappyFiles, Metabox and Bricks, I have developed a snippet…
Categories:
How to Push The Footer Down in Bricks

How to Push The Footer Down in Bricks

Looking to have the footer stay at the bottom of the browser window in your Bricks site? Simply add this CSS: There are several places…
Categories:
Tags:
Pro
Dropdown Menu in Bricks using Interactions

Dropdown Menu in Bricks using Interactions

This Pro tutorial provides the steps to toggle a WordPress menu when a div is clicked using the Interactions feature in Bricks. When clicked: Step…
Categories:
Pro
Stacking Post Cards in Bricks

Stacking Post Cards in Bricks

How we can stack posts in a query loop so they stick on top of the previous one when scrolling.
Categories:
Tags:
Pro
Codrops Dynamic Shape Overlay in Bricks

Codrops Dynamic Shape Overlay in Bricks

This Pro tutorial provides the steps to implement Codrops' SVG shape overlay in Bricks. We shall display a WordPress menu in the overlay after an…
Categories: