Unique Post ID as Link
-
Hello Guys,
i have a Form as Post Data to Save spezific Content as Blog Data in WordPress.
Im using this Snippet to show up the Post Link after Submission.
<?php add_action( 'forminator_post_data_field_post_saved', function( $post_id ){ $_POST['forminator_post_id'] = $post_id; add_filter( 'forminator_replace_form_data', function( $content, $data, $fields ){ if( ! empty( $_POST['forminator_post_id'] ) && false !== strpos( $content, '[post_url]' ) ){ $content = str_replace( '[post_url]', get_permalink( $_POST['forminator_post_id'] ), $content ); } return $content; }, 10, 3 ); } );
Now im looking for something like a Snippet, to make a Unique/Custom URL after Submission instead of the Default Blog Data Link. Something like that: https://myurl.com/dfgrhgrhrthth
My second question is I want the blog post to be read only once, for example when someone opens https://myurl.com/dfgrhgrhrthth they get a button or something like “Really read?” to view the content, after which it should no longer be readable or accessible
Is this possible? Thanks for the Help
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Unique Post ID as Link’ is closed to new replies.