Skip Navigation

[Resolved] Create a post without submission

This support ticket is created 5 years, 11 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 5 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1174515

Tell us what you are trying to do?
I would like to create a new post while a page is visited. I would like to create it without any submit button is pushed but just when a visitor click on the page.

The page should catch some parameters vars from the url, and put it in a new post called "click-traker".

#1174859

Hi, the only way to create a new post from the front-end of the site with Toolset is to use Forms with a submit button. Any other system to create posts requires custom code that uses JavaScript, PHP, and the WordPress API. That type of custom application code falls outside the scope of support we provide here in the forums, but I can give you some links to relevant information:
https://developer.wordpress.org/reference/functions/wp_insert_post/
https://html-online.com/articles/get-url-parameters-javascript/
https://toolset.com/documentation/customizing-sites-using-php/updating-types-fields-using-php/

You might also consider looking for a third-party plugin that handles click tracking. A custom code solution for this type of tracking might not be necessary, and you won't have to worry about millions of posts generated on your site. A good click tracking plugin will be able to filter out bots more effectively, and will store tracking information in a reportable format.