Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

advanced button: dynamic archive url leeds to current post

Home / Forums / Kadence Theme / advanced button: dynamic archive url leeds to current post

This topic is: Awaiting Feedback
[Awaiting Feedback]
Posted in: Kadence Theme
March 17, 2023 at 6:09 am

I added a button to a kadence element-post. This element replaces the content of a single custom post type (project). To link to the archive of projects I added a dynamic url and selected ‘Archive Url’. On the frontend now the button links to the current single project, not the archive.

View the class that renders the url (class-kadence-blocks-pro-dynamic-content.php): the id that is used is obtained by calling get_queried_object_id (in this case the single project) followed by get_the_permalink( $item_id ). I think this should be get_post_type_archive_link( get_post_type( $item_id ) )

  • The forum ‘Kadence Theme’ is closed to new topics and replies.