Problems with my graphene-child theme
-
Mod
Quote:I want to make a child theme in my grapheneYour child theme folder should not be in the Graphene theme folder. Your directory structure should look like this:
wp-content
themes
graphene
graphene-childAll the files related to your child theme would then go in
graphene-child(or whatever you have named this directory).Hi Kenneth, i have my chil theme there but didn’t work! I put the folder in themes graphene-child and inside the file style.css but when i go to the dashboard to active the child theme it show me an advice that the template is missing. But what template? So i put in the chil theme folder the following files: index.php, loop-index.php, and the others loops and funtions.php (this files are the sames that father theme)… And when i active the child theme the navigator show me a page blank…
Mod
Quote:So i put in the chil theme folder the following files: index.php, loop-index.php, and the others loops and funtions.php (this files are the sames that father theme)…Don’t do that, unless you need them to overwrite the parent theme.
Did your child theme style.css file begin like this:
/*
Theme Name: Graphene Child
Theme URI: http://example.com/
Description: Child theme for the Graphene theme
Author: Your name here
Author URI: http://example.com/about/
Template: graphene
Version: 1.0
*/
@import url("../graphene/style.css");yes… but if i only put in the directory graphene-child the file style.css in the dashboard when i want to activate this chil theme i show this advice:
“Themes damaged,
The following themes are installed but incomplete. The themes should have a stylesheet and a template.
Name
Graphene ChildTheme URI: http: //www.aceitedecoco.orgDescription: Child theme for the Graphene themeAuthor: AceitedecocoAuthor URI: http: //www.aceitedecoco.orgTemplate: grapheneVersion: 1.0
template is missing.”
Mod
Please copy and paste the entire contents of your child stylesheet here.
/*
Theme Name: Graphene Child
Theme URI: http://www.aceitedecoco.org
Description: Child theme for the Graphene theme
Author: Aceitedecoco
Author URI: http://www.aceitedecoco.org
Template: graphene
Version: 1.0
*/
@import url("../graphene/style.css");
/* =Resets and Clearfix
*/
html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
img,
ul,
ol,
li,
form,
fieldset {
border: 0 none;
margin: 0;
padding-top: 3px;
}
/* Containers
*/
.widget.jetpack_subscription_widget {
background-color: #acd3fc;
border: 1px solid #2577bb;
alignment-adjust:central;
border-radius: 4px;
margin: 10px 0 0;
min-height: 35px;
overflow: auto;
padding: 5px 0px 5px 30px;
}Admin
WordPress now requires all child themes to have at least two files:
style.css
functions.phpSo delete all the other files that you have in the child theme except the above two. Then, in the functions.php file, just enter this code:
<?php
/* Custom functions for the child theme */Only if i put the index.php in my child theme i can updated it, so in my index i put the same of the father theme
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package Graphene
* @since Graphene 1.0
*/
global $graphene_settings;
get_header(); ?>
<div class="entries-wrapper">
<?php
do_action('graphene_index_pre_loop');
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*/
while ( have_posts() ) {
the_post();
get_template_part( 'loop', 'index' );
}
?>
</div>
<?php graphene_posts_nav(); ?>
<?php get_footer(); ?>But my web show only the background and not the contain. What i have to do in my index of the chidtheme to fix it?
Viewing 10 posts - 1 through 10 (of 10 total)
- You must be logged in to reply to this topic.
