• I want to make a wordpress theme where no registered people can add a post on the frontend. I know that this is possible and i know how to do it but my question is:

    Is it possible to send a activation link to te visitor who post the article? And only when the visitor received the link and clicked on it the post wil be visible on the website?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Yes that should be possible. I’d email the user with a link that included the postid. The link would take them to a custom page that ran a function to update the post status to published.

    Thread Starter sk33l0

    (@sk33l0)

    For example:

    i make a form with the fields: name, email, title, message. So i thought i can use the emailaddress that the visitor filled in and send the activation link to the emailaddress.

    than when the visitor clicked at the link it will open a succespage and update the post.

    Can you tell me how i send a email to the visitor with the postID and what link i have to put in there?

    That’s a lot of code to provide. You’re going to need to look at using $_POST and $_GET for the URL stuff. wp_insert_post() and wp_update_post() to create the post then to update it with the link content. Sending the email would be done with the wp_mail() function. I wrote a tutorial on wp_mail() this week and the link is below. Your also going to need to build a form and handle saving it in to wp_insert_post().

    https://wpthemetutorial.com/2011/10/10/working-with-wordpress-emails/

    In all honesty it’s probably at least a few hours of work to write the code and then test it (if not more) and I’m probably not going to get around to doing it, way to much other work to get done. Sorry.

    Thread Starter sk33l0

    (@sk33l0)

    thnx for your time and explainasion. I will figure it out myself with your tips.

    Happy to point you in the right direction.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Post from frontend’ is closed to new replies.