acf form update post
<?php function my_pre_save_post( $post_id ) {
// Create a new post
$post = array(
'post_status' => 'publish' ,
'post_type' => 'acquisitions',
//Use the ACF fields to create the title or any other field.
'post_title' => 'Acquisition' . ' ' . current_time( 'd/m/Y H:i:s', $gmt = 0 ),
);
// insert the post
$post_id = wp_insert_post( $post );
// return the new ID
return $post_id;
}
add_filter('acf/pre_save_post' , 'my_pre_save_post', 1, 1 ); ?>
<?php acf_form_head(); ?>
<?php get_header(); ?>
Also in PHP:
- Verzeichnis einlesen php
- CODE PPHP
- database seeder in laravel
- echo day php
- data type php get
- clear all cache laravle
- $conn = new mysqli();
- add datetime to datetime php
- error_reporting(E_ALL | E_STRICT);
- phpmake string all lowercase
- check string exist in php
- failed to open stream: no such file or directory php
- array encode php
- fetch visitor ip address php
- create laravel 5.8 project using composer
- check if custom post type exists
- customizing php time format based on location usa europe
- april 6 2010 date format php
- fetch data from phpmyadmin
- cache issue laravel
- calling folder and out into folder in php
- Artisan::call('db:seed', array('--class' => 'YourSeeder Class'));
- create symfony project
- FULL DATE DISPALY IN PHP