style.css des child-themes wird 2x geladen
-
in der funktion.php steht:
<?php /***** Load Stylesheets *****/ function mh_newsdesk_child_styles() { wp_enqueue_style('mh-newsdesk-parent-style', get_template_directory_uri() . '/style.css'); wp_enqueue_style('mh-newsdesk-child-style', get_stylesheet_directory_uri() . '/style.css', array('mh-newsdesk-parent-style')); } add_action('wp_enqueue_scripts', 'mh_newsdesk_child_styles'); /***** Output Post Meta Data *****/ function mh_newsdesk_mg_meta() { $mh_newsdesk_options = mh_newsdesk_theme_options(); $post_cat = !$mh_newsdesk_options['post_meta_cat']; $post_author = !$mh_newsdesk_options['post_meta_author']; $post_date = !$mh_newsdesk_options['post_meta_date']; if ($post_cat || $post_author || $post_date) { echo '<p class="entry-meta">' . "\n"; if (has_category() && $post_cat && !is_single()) { echo sprintf(_x('%s', 'post category', 'mh-newsdesk'), '<span class="entry-meta-cats">' . get_the_category_list(', ', '') . '</span>') . "\n"; } if ($post_date) { echo '<span class="entry-meta-date updated">' . get_the_date() . '</span>' . "\n"; } if ($post_author) { echo '<span class="entry-meta-author vcard author">' . sprintf(_x('Posted By: %s', 'post author', 'mh-newsdesk'), '<a class="fn" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a>') . '</span>' . "\n"; } echo '<span class="entry-meta-comments">' . sprintf(_nx('1 Kommentar', '%1$s Kommentare', get_comments_number(), 'comments number', 'mh'), number_format_i18n(get_comments_number())) . '</span>' . "\n"; echo '</p>' . "\n"; } } //* IP-Adressen in Kommentaren löschen *// function wpb_remove_commentsip( $comment_author_ip ) { return ''; } add_filter( 'pre_comment_user_ip', 'wpb_remove_commentsip' ); /***** Remove Google Fonts *****/ function mh_newsdesk_mg_remove_google_fonts() { remove_action('customize_register', 'mh_newsdesk_typography_options'); remove_action('wp_enqueue_scripts', 'mh_newsdesk_google_webfonts'); remove_action('wp_head', 'mh_newsdesk_fonts_css'); } add_action( 'after_setup_theme', 'mh_newsdesk_mg_remove_google_fonts' );
wp 5.8.3
Die Seite, für die ich Hilfe brauche: [Anmelden, um den Link zu sehen]
Ansicht von 13 Antworten - 1 bis 13 (von insgesamt 13)
Ansicht von 13 Antworten - 1 bis 13 (von insgesamt 13)
- Das Thema „style.css des child-themes wird 2x geladen“ ist für neue Antworten geschlossen.