MailPress Child Themes - wordpress

I found the solution, so I'll post this in case anyone else is looking for this info.
I was looking into using a child theme with MailPress (the Wordpress newsletter plugin).
I created the following folder:
public/mysite/wp-content/plugins/mailpress/mp-content/themes/twentyten-child
But when I went to the Admin->Mails->Themes page to activate this child theme, it showed the error:
The parent theme is missing. Please install the "twentyten-child"
parent theme.

The answer was to insert the following comments at the top of the child theme's style.css file:
/*
Theme Name: twentyten Child Theme
Template: twentyten
Version: 0.1
*/

Related

Broken theme after WordPress update

I just updated to WordPress 4.8.3 to find that my custom parent theme is broken. It's been a while since I've worked on it, so I'm not completely fresh on everything, but the error in WordPress is as follows:
Template is missing. Standalone themes need to have a index.php template file. Child themes need to have a Template header in the style.css stylesheet.
I don't need the Template header because this isn't a child theme and my theme folder does have an index.php template in ~/www/website/wp-content/themes/theme/. Has anyone else encountered this? Googling just points to the solution being the missing Template header in style.css. Thanks in advance.
My style.css only contains the following headers:
/*
Theme Name: Portfolio
Theme URI: http://www.website.com
Author: Author Name
Author URI: http://www.website.com
Description: Custom theme converted from Bootstrap template
Version: 1.1
*/
In case this happens to anyone else, the solution was moving my style.css into the theme's root directory. Previously, it was in a css folder, which worked fine.

New template not showing up in Template dropdown

I've created a twentyfourteen child theme using the One-click child theme plugin. Then I copied the page.php template from the parent theme folder to the file new-template.php in the child folder. I changed the header in new-template.php to
Template Name: New Template
As far as I know that's all I need to do to get "New Template" to show up in the Template dropdown under Page Attributes when you create a new page. But "New Template" hasn't been added to the dropdown. Does anyone know what the problem might be?
Thank for any help
Just in Wordpress 4.9 there's this bug: https://core.trac.wordpress.org/ticket/42573 causing the template files to only be rescanned once every hour.
To fix (until they release a new WP version with this changed), download the patch on that bug ticket and make the changes from the patch to wp-includes/class-wp-theme.php.
Hope this saves someone the 2 hours I wasted on this..
For the Wordpress 4.9 bug mentioned above, just update the version of your theme in style.css, e.g. from 1.1.2 to 1.1.3 - even 1.1.2-1 will do. This will force updating templates list.
Please make sure You have activated your child theme, if your child theme is already activated then try a different template name.
This worked for me :
<?php /* Template Name: Red Template */ ?>
and a copy of page.php in my theme dir called redpage.php
I also had to log out of the admin and then log back in.
I tried everything and finally did as stol mentioned above. Update the verison of your theme is style.css located in your themes folder. Mine was set to 0.1.3. I updated to 1.1.2 and it worked.
1.active your child theme
2.if you optimze your style.css file add again your first comment such as
/*
Theme Name:
Description:
Author:
Theme URI:
Author URI:
Version:
Template:
License:
License URI:
Text Domain:
Tags:
*/

About WordPress child theme

I have created wordpress child theme from parent theme "twentythirteen". My child theme name is "twentythirteen-child".It has following content.
/*
Theme Name: twentythirteen-child
Theme URI: http://www.example.com
Description: A Twenty Thirteen child theme
Author: WPBeginner
Author URI: http://www.example.com
Template: twentythirteen
Version: 1.0.0
*/
#import url("../twentythirteen/style.css");
Unfortunately my child theme replaces the parent theme and newly created theme is applying when i activate child theme and there is no parent theme style is applied on webpage.
How can i solve this problem?
Couple things to try:
Double check to make sure your template path in the header you posted actually goes to the twenty-thirteen theme. That could be why the base styles aren't appearing.
Your child theme needs it's own style.css - you can't import that. Read more on the WordPress Child Theme Codex Page.
Make sure you didn't copy over the entire directory into the child folder. That's a common beginner mistake.
Your child theme is supposed to override the parent theme. It supersedes any parent theme files you put into it. For example, if you put a different page.html in the root of your child theme, it would replace the page.html from the twenty-thirteen parent theme.

How to activate the child theme in Wordpress?

I create a new style.css and use it in child theme. And I create a new folder in wp-content and name it as themename-child and upload the style.css that I created. Now, I go to wp dashboard -> Appearance -> Themes and I look the child theme that I create. And I found this error:
Broken Themes
The following themes are installed but incomplete. Themes must have a stylesheet and a template.
Name Description
Accesspress Lite The parent theme is missing. Please install the "AccesspressLite" parent theme.
Is there anything that I need to upload? Please help me. I'm new in WordPress. Thank you!
No, the problem here is that you must specify the parent template in commented area of your child style.css
Example from Wordpress Codex
/*
Theme Name: Twenty Fourteen Child
Theme URI: http://example.com/twenty-fourteen-child/
Description: Twenty Fourteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfourteen
Version: 1.0.0
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fourteen-child
*/
#import url("../twentyfourteen/style.css");
Line with
Template: twentyfourteen
is what your need. Your parent theme must be in corresponding folder, in this example, themes/twentyfourteen.
Also, in your parent template you must load style.css via get_stylesheet_uri() for child theme to work correctly.
Seems clear to me that you need to install the Parent Theme, which is required for child theme installation...
The parent theme is missing. Please install the "AccesspressLite" parent theme.
The whole purpose of the child theme is that it feeds it's adjustments into the parent theme, so you don't have to adjust parent theme settings.

wordpress child theme not working

i am new to word press now i am working on wordpress child theme. now i am going to creat child theme of " Chulavista " theme.
i just creat a sub directory and creat file with name of style.css
in my style.css just place this code
#charset "utf-8";
/* CSS Document */
/*
Theme Name: chulavista Child
Theme URI: agilesoft.us
Description: Chulavista child Theme
Author: Agilesoft
Version: 1.3
License: GNU General Public License
Template: chulavista
Tags:
*/
#import url("../chulavista/style.css");
its simple. but when i activate child theme the layout font and header will be change and show recent post, meta, and category in top menu div.
i can't understand this behaviour. because when i activate parent theme it will be correct.
Please help me out of this problem...
Thanks in advance
Your style.css is correct, your problem is something else.
I will assume that you are working on a Linux Environment.
If you want to install custom themes manually copying your theme directly in the wp-content/themes folder, be sure you create a symbolic link for it as well:
Example:
sudo ln -s /var/www/wordpress/wp-content/themes/your_theme/ /var/lib/wordpress/wp-content/themes/your_theme
I had the same problem as you and I fixed it by creating the symbolic link. Hope this helps.
The Child theme is an individual theme which relies on the Parent's theme files. When you activate the Child theme, you have to set the Appearance settings for the theme. Similar to what you do while activating another Parent theme.
Note that the layout font might be changing due to the same reason.
Does Chulavista support child themes? If it hasn't been written with child themes in mind, it might not properly support them. e.g. if it uses get_template_directory_uri() instead of get_stylesheet_directory_uri(). Check the functions.php and header.php files in the Chulavista theme to see if that is the case.

Resources