<?php $infosPratiques = get_page_by_path('infos-pratiques'); if (themosis_is_post($infosPratiques->ID)) { /*-----------------------------------------------------------------------*/ // TEAM METABOX /*-----------------------------------------------------------------------*/ Metabox::make('Team', 'page')->set(array(Field::infinite('collaborators', array(Field::text('full-name', array('title' => 'Full name')), Field::text('job'), Field::media('pic')), array('title' => 'Collaborateurs')))); }
<?php /*-----------------------------------------------------------------------*/ // Home/Front page. /*-----------------------------------------------------------------------*/ $home = (int) get_option('page_on_front'); if (themosis_is_post($home)) { //params spécifiques pour la home } /*-----------------------------------------------------------------------*/ // Remove editor from home page. /*-----------------------------------------------------------------------*/ add_action('init', function () use($home) { if (themosis_is_post($home)) { remove_post_type_support('page', 'editor'); } });