Bricks Version: 1.6.1
Browser: Chrome last version
OS: macOS
Inside of Bricks Builder and Button Link Type field:
How to link to CPT Default Archive Page?
Bricks Version: 1.6.1
Browser: Chrome last version
OS: macOS
Inside of Bricks Builder and Button Link Type field:
How to link to CPT Default Archive Page?
Can you not use an external link with the slug path to the template?
Sure, is easy and doable. But I wanted to know how to link dynamically to such pages …
This ever get picked up? Finding myself in the same boat, what about if anybody changes the slugs - all the instances will need updating?
My only work around unless Bricks comes back with a better way @aslotta
{echo:get_post_type_archive_link(‘your-post-type’)}
This worked well for me, thank you very much!
Did anyone end up finding a way? I tried using {echo:get_post_type_archive_link(‘your-post-type’)} but it doesnt work.
Probably because you need to add the function to your echo allowlist filter. Filter: bricks/code/echo_function_names – Bricks Academy
Still a good idea to add archive pages to the dropdown.
Can someone help me how and where to add the {echo:get_post_type_archive_link(‘your-post-type’)}? Thanks1
Just make sure that the quotes are not the fancy inclined ones.
Just tried, with the correct quotes, but it doesn’t work. empty return.
the code is signed with bricks/code/echo_function_names also
For me it works with single quotes
{echo:get_post_type_archive_link('post')}
or without quotes
{echo:get_post_type_archive_link(post)}