Skip Navigation

[Resolved] Duplicate Post on Front End

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by Luo Yang 6 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#907119

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:

[duplicate_post]
#907131

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?

#907306

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/