anthy
January 23, 2024, 10:43am
1
Hi there
I am displaying some Custom Posts on my page and I was able to link them using {post_title:link}
I would like to link the entire post, but I don’t know how to, and I don’t see any option for it.
Basically, I would like that on hover the entire post is linked and not just the image or the title.
I found this , but it does not work for me.
Any idea on how I can manage this?
Many thanks in advance!
anthy
January 23, 2024, 12:10pm
3
Tried that too. No results
It’s easier to use a query loop
The Query Loop builder is available for all layout elements, Accordion, and Slider elements. It can also be enabled for the Accordion (Nestable), Tabs (Nestable), and Slider (Nestable). It lets you query your database (according to your query...
1 Like
@anthy Were you able to get the query loop to work? It didn’t work for me. I’d also like to find a way to link the entire post and not individual elements.
timmse
April 4, 2024, 10:12am
6
Hi anthy,
The solution to which you are referring is fairly old, and the markup has changed since then.
This should work (Bricks > 1.9.7):
%root% .bricks-layout-item .content-wrapper {
position: static;
}
%root% .bricks-layout-wrapper {
position: relative;
}
%root% .bricks-layout-wrapper a::before {
content: "";
position: absolute;
inset: 0;
z-index: 1;
}
For this to work, you have to remove every link and only use the link of the post title ({post_title:link}).
1 Like
timmse
April 4, 2024, 10:29am
7
Hi Sarah,
In a loop, you can achieve it in two ways:
change the outer tag to a
.
Use the pseudo-element approach
The following also applies here (especially for variant 1): there may only be one link (for the post title).
See the attached template, which contains all solutions.
1 Like
anthy
April 4, 2024, 12:24pm
8
Hi @timmse
Many thanks! It works like a charm.