WordPress – Elegant themes – Extra – Autoriser Extra Settings pour les custom post types – Enable Extra Settings for CPTs
Ajouter Extra Settings pour les custom post types Add Extra Settings for Custom Post Types for Extra from elegant themes NOT WORKING YET sur le thème parent… Parent theme wp-content/Extra/includes/admin/admin.php Pour rajouter « Sidebar location » et « Choose Sidebar/Widget Area » ligne 1502 To add « Sidebar Location » and « Choose Sidebar/Widget area » text line 1502 class Extra_Page_Post_Settings_Meta_Box extends ET_Meta_Box { public function __construct(){ parent::__construct( 'extra-page-post-settings', esc_html__( 'Extra Settings', 'extra' ), array( 'post_type' => array( 'post', 'page', 'formations-gratuites', 'formations-membres', EXTRA_LAYOUT_POST_TYPE, EXTRA_PROJECT_POST_TYPE, 'product', ), 'context' => 'side', ) ); } ligne 1569 find line 1569 trouver if ( 'post' == $post->post_type ) { $this->fields['_extra_featured_post'] = array( 'title' => esc_html__( 'Featured Post', 'extra' ), ); // Display Author Box field depending on ePanel value. if ( 'on' == et_get_option( 'extra_show_author_box', 'on' ) ) { $this->fields['_extra_hide_author_box'] = array( 'title' => esc_html__( 'Hide Author Box', 'extra' ), ); } else { $this->fields['_extra_show_author_box'] = array( 'title' => esc_html__( 'Show Author Box', 'extra' ), ); } // Display Related Posts field depending on ePanel value. if ( 'on' == et_get_option( 'extra_show_related_posts', 'on' ) ) { $this->fields['_extra_hide_related_posts'] = array( 'title' => esc_html__( 'Hide Related Posts', 'extra' ), ); } else { $this->fields['_extra_show_related_posts'] = array( 'title' => esc_html__( 'Show Related Posts', 'extra' ), ); } } rajouter le code suivant juste après add the following code right after the previous code if ( 'formations-gratuites' == $post->post_type ) { $this->fields['_extra_featured_post'] = array( 'title' => esc_html__( 'Featured Post', 'extra' ), ); // Display Author Box field depending on ePanel value. if ( 'on' == et_get_option( 'extra_show_author_box', 'on' ) ) { $this->fields['_extra_hide_author_box'] = array( 'title' => esc_html__( 'Hide Author Box', 'extra' ), ); } else { $this->fields['_extra_show_author_box'] = array( 'title' => esc_html__( 'Show Author Box', 'extra' ), ); } // Display Related Posts field depending on ePanel value. if ( 'on' == et_get_option( 'extra_show_related_posts', 'on' ) ) { $this->fields['_extra_hide_related_posts'] = array( 'title' => esc_html__( 'Hide Related Posts', 'extra' ), ); } else { $this->fields['_extra_show_related_posts'] = array( 'title' => esc_html__( 'Show Related Posts', 'extra' ), ); } } if ( 'formations-membres' == $post->post_type ) { $this->fields['_extra_featured_post'] = array( 'title' => esc_html__( 'Featured Post', 'extra' ), ); // Display Author Box field depending on ePanel value. if ( 'on' == et_get_option( 'extra_show_author_box', 'on' ) ) { $this->fields['_extra_hide_author_box'] = array( 'title' => esc_html__( 'Hide Author Box', 'extra' ), ); } else { $this->fields['_extra_show_author_box'] = array( 'title' => esc_html__(...
Read more
Commentaires récents