Displaying Link field
The Link field type allows editors to select or define a link (url, title, target) by using the native WordPress link popup.
Advanced Views natively supports the following link types:
WordPress: TitleWithLink, AttachmentWithLink, TermNameLink, MenuItemLink field
ACF: any Link field
MetaBox: any Number field
Pods: any PlainNumber field
1. How to display a Link field
Add any Link field
Save the Layout, copy its embedding shortcode
Embed Layout: paste the shortcode inside the target place
By default, Advanced Views outputs an a - link HTML tag, and you can customize the Layout template to use the render options:
2. Render options for Link field
2.1) 'Image' link
You can wrap any image into the link. This well-known technique provides a visual representation, allowing readers to click on the image to open a specified URL.
Make sure both image and link fields are added to the specific Layout, and amend the template to put the 'img' tag inside the 'a' tag, as shown below:
2.2) On-page link content preview
Whether the link field points to an external or internal URL, you can display it directly on the page using the <iframe> element:
3. FAQs
Last updated