Ich erstelle ein Kind Thema, aber dann möchte ich etwas Stil hinzufügen es nicht in meinem Hauptmenü ändern.wie man arbeitet Wordpress Kind Thema
ich einen Ordner aloshop-Kind in der
\public_html\wp-content\themes
In diesem Ordner Richtung erstelle ich zwei Dateien style.css und function.php erstellen In function.php hinzugefügt I-Code:
<?php
function aloshop_child_enqueue_styles() {
$parent_style = 'aloshop';
wp_enqueue_style($parent_style, get_template_directory_uri() . '/style.css');
wp_enqueue_style('aloshop',
get_stylesheet_directory_uri() . '/style.css',
array($parent_style)
);
}
add_action('wp_enqueue_scripts', 'aloshop_child_enqueue_styles');
und in style.css fügen Sie einfach einfache Informationen
/*
Theme Name: Aloshop child theme
Author: Mantas Slau
Description: A child theme of the Aloshop default WordPress theme
Version: 1.1
Template: aloshop
*/
Nächste, was ich d ID, im Dashboard aktiviert dieses Kind Thema.
Also habe ich versucht zu überprüfen, ob dieses Kind Thema funktioniert. Ich schneide aus meinem Visual-Composer-Css-Code (den ich temporär hinzugefügt habe, entwickelte dann meine Seite) und füge ihn in das Child-Theme -> `style.css ein.
/*
Theme Name: Aloshop child theme
Author: Mantas Slau
Description: A child theme of the Aloshop default WordPress theme
Version: 1.1
Template: aloshop
*/
.footer-box h2 {
font-size: 14px;
font-weight: 700;
margin: 0 0 13px;
text-transform: uppercase;
color: #fe9c00;
}
.menu-footer a {
border-left: 1px solid #dadada;
display: block;
height: 14px;
line-height: 14px;
padding: 0 13px;
color: white;
}
.footer-box p {
color: white;
}
.footer-menu-box-end a {
color: white;
font-size: 14px;
padding-left: 10px;
position: relative;
}
.footer-menu-box-end a:hover{
color: #fe9c00;
}
.footer-menu-box-end h2 {
font-size: 14px;
font-weight: 700;
margin: 0 0 13px;
text-transform: uppercase;
color: #fe9c00;
}
.footer-box-contact a {
color: white;
}
.social-footer li:first-child a{
margin-left:10;
}
.social-footer.social-network label {
margin: 0 0 10px;
color: #fe9c00;
}
.category-home-label span {
color: #fff;
font-size: 12px;
font-weight: 700;
margin: 0;
text-transform: uppercase;
vertical-align: middle;
}
ul {
padding: 0;
list-style: none;
}
.sub-menu-top {
width: 200px;
}
.list-child-category {
min-height: 155px;
}
.woocommerce div.product .product_title {
font-size: 25px;
font-weight: 700;
margin: 0 0 13px;
text-transform: uppercase;
}
.price span {
font-size: 25px;
font-weight: 700;
margin: 0 0 13px;
text-transform: uppercase;
color: #fe9c00;
}
.woocommerce div.product div.images img {
/* display: block; */
/* width: 100%; */
/* height: auto; */
/* box-shadow: none; */
width: 350px;
padding: 1px;
border: 1px solid #e0e0d1;
background-color: #e0e0d1;
}
Stil-Code, aber es macht keinen Sinn.
Speichern ---> Aktualisieren und Stil funktioniert nicht. Kann jemand mit diesem Problem helfen? Was mache ich falsch? Vielen Dank im Voraus