Home › Forums › Front-end Issues › How do the date of publication by a front-end form? › Reply To: How do the date of publication by a front-end form?
Hi @buylov
You can add a style to hide this field using the “acf/admin_head” hook. Something like this I think:
function my_acf_admin_head() {
?>
<style type="text/css">
.post-php .acf-field-5694a485a4a99, .post-new-php .acf-field-5694a485a4a99 {display:none;}
</style>
<?php
}
add_action('acf/input/admin_head', 'my_acf_admin_head');
To make it use your site’s timezone, kindly change “post_date” to “post_date_gmt”. This page should give you more idea about it: https://codex.wordpress.org/Function_Reference/wp_insert_post.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.