Link entire single post and not just the title or image

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!

use ‘root’ tag as %root%

Tried that too. No results :confused:

It’s easier to use a query loop

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.

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

Hi Sarah,
In a loop, you can achieve it in two ways:

  1. change the outer tag to a.
  2. 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

Hi @timmse

Many thanks! It works like a charm.