I want to use three custom fields in my CPT called issue. the three custom fields are;
- number
- type
- year
These three custom fields together will form the title and the slug.
Now I created the following code in /wp-include/post.php;
I rewrote some of the code and placed it in the functions.php of my theme. Now the draft is saved with dashes in the title, but not the values from the fields. How can I figure out what the names of the fields are?
Fields I'm using have the following IDs;
wpcf[number]
wpcf[type]
wpcf[year]
And none is working or giving the expected result.
I was able to determine that the data is available in the post data;
[wpcf] => Array ( [year] => 2015 [number] => 12 [type] => dd-weekblad [barcode] => 12 )
Just for some strange reason, I'm unable to take the array and trim it into the variables $issue_number, $issue_type and $issue_year.