I have followed the instructions of Shane here: https://toolset.com/forums/topic/duplicate-custom-posts-at-front-end/
I am trying to add a button on the front end so that logged in users can easily duplicate a post and get redirected to the new duplicated cred post and modify what they need!
i have installed duplicate post plugin and aded the shortcode that Shane provided to my single post template, but this didn't work! i cant see a duplicate post link on the front end.
i would like to know what is the easiest way to achieve this? or what code i need to use?
Function:
// Add Shortcode [duplicate_post]
function duplicate_posts() {
// Code
duplicate_post_clone_post_link( __('Clone this Post','duplicate-post'), $before, $after, $id );
}
add_shortcode( 'duplicate_post', 'duplicate_posts' );
Shortcode:
Update:
This works now and show the "clone this post" link on the front end. i had to change the permissions settings in Duplicate Posts plugin.
What i dont want is when user duplicates a post it should direct him to a Post Form (cred form). i dont want to give user access to the back-end. is there away to achieve this?
Hello,
There isn't such a feature within Toolset plugins, the "clone this post" link is outputted from the custom shortcode [duplicate_post], it is using PHP function duplicate_post_clone_post_link(), which is a function of "Duplicate Post" plugin, we can not change the link from Toolset side.
According to our support policy, it is out the range of Toolset support:
https://toolset.com/toolset-support-policy/
But you can check it with our experienced contractors:
https://toolset.com/contractors/