Use ACF Link in Custom Post Layout

I’m trying to customize a Post Carousel to show an ACF field and link it to the correct post.

I’ve created an ACF field for “Display Page Name”, so that I can call a different page title than the one assigned to the page/post.

I’m using a Post Carousel module with Custom Layout. I can get the ACF field to display correctly, but I haven’t figured out how to hyperlink it.

This code displays the ACF text correctly.

<h3 class="uabb-post-heading uabb-blog-post-section">[wpbb post:acf name='display_page_name']</h3>

I’ve tried all these variations but none work to link the ACF text.

<h3 class="uabb-post-heading uabb-blog-post-section">[wpbb post:acf name='display_page_name' linked='yes']</h3>

<h3 class="uabb-post-heading uabb-blog-post-section"><a href="[wpbb post:link]">[wpbb post:acf name='display_page_name']</a></h3>

<h3 class="uabb-post-heading uabb-blog-post-section">[wpbb post:link text="[wpbb post:acf name='display_page_name']"]</h3>

What am I missing here?


I think you are over thinking it :wink:
Try wrapping your new page title text in the post url shortcode like you would in normal html

<a href="[wpbb post:url]">[wpbb post:acf name='display_page_name']</a>
Only add your h3 in there.

1 Like

Thanks! I had tried that too but was using wpbb post:link which was creating a URL inside a URL.

This works now!