- This topic has 9 replies, 3 voices, and was last updated 2 years, 11 months ago by
Fernando.
-
AuthorPosts
-
March 31, 2023 at 8:08 pm #2591467
Maria
Don’t know what I’m missing. What I want to happen: When visitors click on “Get this typeface” link, they should be taken to the page to buy the font. Instead, they remain on the same page.
Steps taken:
Created Custom Post Type
Created field in ACF using URL field type
Created Block Element > Content Template
Element > Display Rule set to the CPT
Element Type > Content Template
Enabled Dynamic Data
Data Source > Current Post
Link Source > Post Meta
Post Meta Field > Fields Name
Page: https://demo.mariajacksondesign.com/typeface/test-typeface/April 1, 2023 at 6:09 am #2591918David
StaffCustomer SupportApril 1, 2023 at 10:32 am #2592237Maria
It came from the Typefaces custom post type. I needed some dummy content to enter to test the page. https://www.screencast.com/t/c5E8AC3jx
April 1, 2023 at 2:15 pm #2592416David
StaffCustomer SupportSorry I should have highlighted this:
<a href="#"> "Get this typeface <span class="new-tab-icon">«</span> </a>Where does that content come from ?
April 1, 2023 at 8:18 pm #2592595Maria
I added it to position the right upper arrow. I just removed it to help troubleshoot. https://www.screencast.com/t/AlgHR7lPL
April 2, 2023 at 6:52 am #2593000David
StaffCustomer SupportOK, remove that HTML as it will break the string replacement.
Just add the Headline block with some text, and a link, and then add the dynamic data.
Does that work?Then we can look at adding icon.
April 2, 2023 at 3:15 pm #2593665Maria
I removed the HTML, added the headline block and added the dynamic data. It now works as expected, but how do I add the target=”_blank” attribute to open in a new window? I tried using the ACF field type Link, which gives the option to open in new window, but it doesn’t work. Not sure if this is a question for ACF.
The field type URL now works, but doesn’t open in new window. The field type Link gives option to open in new window, but goes to 404 page. https://www.screencast.com/t/3jd6whG2y
April 2, 2023 at 7:10 pm #2593786Fernando Customer Support
April 2, 2023 at 8:41 pm #2593851Maria
That works beautifully! Thanks to you both, David and Fernando.
April 2, 2023 at 10:15 pm #2593907Fernando Customer Support
You’re welcome, Maria!
-
AuthorPosts
- You must be logged in to reply to this topic.
