-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
63 lines (58 loc) · 1.8 KB
/
functions.php
File metadata and controls
63 lines (58 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
add_theme_support('post-thumbnails');
// Permetto l'upload dei file SVG
add_filter('upload_mimes', function ($mimes = array()) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
});
/**
* CPT
* cpt_name
**/
function cpt_name_cpt()
{
register_post_type(
'pillar',
array(
'labels' => array(
'name' => __('Pillars', 'textdomain'),
'singular_name' => __('Pillar', 'textdomain'),
'menu_name' => _x('Pillar', 'admin menu'),
'name_admin_bar' => _x('Pillar', 'admin bar'),
'add_new' => _x('Aggiungi pillar', 'add new'),
'add_new_item' => __('Aggiungi pillar'),
'new_item' => __('Nuovo pillar'),
'edit_item' => __('Modifica pillar'),
'view_item' => __('Vedi pillar'),
'all_items' => __('Tutte le pillar'),
'search_items' => __('Cerca pillar'),
'not_found' => __('Nessun pillar trovato.'),
),
'supports' => array('title', 'editor', 'thumbnail', 'taxonomy'),
'public' => true,
'has_archive' => true,
'show_in_rest' => true
)
);
register_taxonomy(
'argomento',
'pillar',
array(
'label' => 'Argomenti',
'singular_label' => 'Argomento',
'hierarchical' => true,
'query_var' => true,
'public' => true,
'has_archive' => true,
'show_ui' => true,
)
);
}
// add_action('init', 'cpt_name_cpt');
// Salvo le impostazioni acf cartella /acf-json
function my_acf_json_save_point($path)
{
$path = get_stylesheet_directory() . '/acf-json';
return $path;
}
add_filter('acf/settings/save_json', 'my_acf_json_save_point');