fixing renaming problem
This commit is contained in:
parent
b0d79dc9c5
commit
33aff07060
|
|
@ -3,16 +3,18 @@
|
|||
function homegrade_brochure_post_title_updater($post_id)
|
||||
{
|
||||
|
||||
|
||||
|
||||
$my_post = array();
|
||||
$my_post['ID'] = $post_id;
|
||||
if (!$post_id) return
|
||||
|
||||
$brochureTaxonomy = get_the_terms($post_id, 'thematiques')[0];
|
||||
$fields = get_fields($post_id);
|
||||
$brochureTaxonomy = $fields['publications_taxonomy'];
|
||||
|
||||
if (!$post_id) return;
|
||||
|
||||
// write_log($brochureTaxonomy);
|
||||
|
||||
if (get_post_type() == 'brochures') {
|
||||
|
||||
$my_post['post_title'] = "";
|
||||
$my_post['post_title'] = $brochureTaxonomy->name;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user