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
<ul>
<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>
</ul>
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
<ul>
<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>
</ul>
How about redirecting specific users with a set of redirect rules? You can try using Peter’s Login Redirect plugin. Follow these steps:
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.