Supporto » Aspetto = Temi » Aiuto creazione child theme Fluida

  • Risolto mrpress01

    (@mrpress01)


    Ciao a tutti ho un problema nella creazione del child theme del mio tema Fluida. Il file css del tema genitore è il seguente

    /*
    Theme Name: Fluida
    Theme URI: http://www.cryoutcreations.eu/wordpress-themes/fluida
    Description: Fluida is a modern, crystal clear and squeaky clean theme. It shines bright with a fluid and responsive layout and carries under its hood a light and powerful framework. All the theme's graphics are created using HTML5, CSS3 and icon fonts so it's extremely fast to load. It's also SEO ready, using microformats and Google readable Schema.org microdata. Fluida also provides over 100 customizer theme settings that enable you to take full control of your site. You can change everything starting with layout (content and up to 2 sidebars), site and sidebar widths, colors, (Google) fonts and font sizes for all the important elements of your blog, featured images, post information metas, post excerpts, comments and much more. Fluida also features social menus with over 100 social network icons available in 4 locations, 3 menus, 6 widget areas, 8 page templates, all post formats, is translation ready, RTL and compatible with older browsers. If you want to take things further via a child theme you'll find clean code, either hookable or pluggable functions with clear descriptions and over 25 action hooks ready for action. Fluida - because solid is so overrated!
    Author: Cryout Creations
    Author URI: http://www.cryoutcreations.eu
    Version: 1.3.4
    License: GNU General Public License v3.0
    License URI: http://www.gnu.org/licenses/gpl-3.0.html
    Tags: one-column, two-columns, three-columns, right-sidebar, left-sidebar, grid-layout, custom-background, custom-colors, custom-header, flexible-header, custom-menu, featured-image-header, featured-images, front-page-post-form, full-width-template, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, blog, e-commerce, news, entertainment, photography, portfolio
    Text Domain: fluida
    
    Fluida WordPress Theme - Copyright 2015, Cryout Creations - http://www.cryoutcreations.eu
    This theme, like WordPress, is licensed under the GPL.
    */

    Il mio tema child l’ho così omposto
    Fluidachildtheme.zip  fluidachildtheme  Style.css

    /* 
    Theme Name:		 Fluida Child Theme
    Theme URI:		 
    Description:		 
    Author:			 frai
    Author URI:		 
    Template:		 fluida
    Version:		 1.3.4
    Text Domain:	 	 Fluida-child
    */

    E il file functions.php

    <?php 
    	 add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    	 function my_theme_enqueue_styles() { 
     		  wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); 
     		  } 
     ?>

    Quando lo attivo le pagine risultano tutte sfalsate come se non caricasse il file css.
    Sapete dirmi dove ho sbaglaito?
    Grazie mille

Stai visualizzando 2 risposte - dal 1 al 2 (di 2 totali)
  • Gloria Liuni

    (@glorialchemica)

    Ciao @mrpress01,
    al posto di parent-style, dovresti mettere il nome del tema genitore.

    Come da documentazione, puoi provare anche questo codice:

    <?php
    function my_theme_enqueue_styles() {
    
        $parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style ),
            wp_get_theme()->get('Version')
        );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    ?>

    In alternativa puoi rimuovere il tuo Child dalla root del sito e provare a crearlo col plugin https://it.wordpress.org/plugins/childify-me/

    Chi ha creato la discussione mrpress01

    (@mrpress01)

    Grazie mille per la risposta, Ho gia risolto con un plugin che me lo ha creato e poi l ho eliminato

    • Questa risposta è stata modificata 4 anni, 9 mesi fa da mrpress01.
Stai visualizzando 2 risposte - dal 1 al 2 (di 2 totali)
  • Il topic ‘Aiuto creazione child theme Fluida’ è chiuso a nuove risposte.