I am going to find a way for logged in users to create pages from front page. For example there are three buttons so called button1,2,3. When logged in users clicks on button1, a page with title newyork1 is created and if user clicks on New York button for one more time, a new page newyork1-1 and newyork1-2 are created and the same logical with Tokyo and London. I have tried Wordpress Rest API then wp_insert_post() function but it not working as it cannot get the author and title as i aspected. If you guys have a better idea, please help. Thank you

    <li> <a href="" data-name="newyork"> New York</a></li> 
    <li> <a href="" data-name="tokyo"> Tokyo</a></li>
    <li> <a href="" data-name="london"> London</a></li>
  • Hi @Tony, your question is too vague and not appropriate for this forum, you are unlikely to get any answers. You are seeking to solutions to your specific problem, and not to a general WP functionality problem. Questions which have a real value for the rest of the community (ie that others may face too) are more likely to get you answers.
    – Aurovrata
    Feb 1, 2019 at 8:55

2 Answers 2


How about redirecting specific users with a set of redirect rules? You can try using Peter’s Login Redirect plugin. Follow these steps:

  1. Install and activate the plugin.
  2. Hover on Settings in the left sidebar.
  3. Click on Login/logout redirects.
  4. Enter your custom Login URL for specific users.

Already has a solution here You have modify a bit to use it. 1. 'post_type' => 'post', change to 'post_type' => 'page',

Also your user must have capabilities to create page. Here is another solution on how to handle that.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.