Wordpress Broken Themes - wordpress

In the WordPress 'Install Themes' option I have installed a theme called Facelook but after successful installation when I tried to activate it, following message appeared.
The following themes are installed but incomplete. Themes must have a
stylesheet and a template. Name: Facelook. Description: The parent
theme is missing. Please install the "bp-default" parent theme.
Where I can install bp-default? What does this error message mean?

Sounds like the "Facelook" theme is a child theme of the "bp-default" theme. You'll need to locate the bp-default theme and install it before you can use Facelook.

Check all uppercase/lowercase characters in the theme folder name match EXACTLY to the theme reference inside Style.css match.
Often when Wordpress complains that a theme is not installed (either when trying to use the theme, or when referencing the parent from a child-theme), it is because of an uppercase/lowercase mismatch.
For example:
inside style.css...
Template: supertemplate
is not the same as the folder name "Supertemplate"
Seems trivial, but something to check.

Related

Whitelabel WordPress Theme

How do I change a WordPress Theme name and keep it changed after an update? I have tried renaming the wp-content/themes/ folder, and the name inside the style.css file as well. However, the theme goes back to its original name after the update.
Perhaps there is a plugin that automatically overwrites the theme name and renames its folder to make it white label?
Steps that I have already done:
wp-content/themes/<renamed theme> - Changed theme name
Changed name inside theme's style.css file
Anything I can do to make the theme name automatically renamed even after the theme's automatic update (have to keep it due to security).
Change the name in the /themes/[renamed theme]/style.css
The line > Theme Name: [change it here]
If you update a theme via the WordPress admin it will overwrite all of its content. If you don't want it to update, try also changing the version to something really high in the style.css.
Example:
Version: 99.99
If you still want the renamed theme to update automatically it will always update all files. This can't be avoided.
Why not just use a child theme instead? https://developer.wordpress.org/themes/advanced-topics/child-themes/

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:
*/

Buddypress template hierarchy is not being used

I am updating an installation of buddypress (1.5) to the most recent version (2.1.1). I have updated the files and am now trying to update the theme to use the template hierarchy pattern.
For this I created the following directory structure within my theme:
my-theme/
buddypress/
groups/
index-directory.php
index-directory.php contains a single die('debug') statement for testing.
If I copy this buddypress directory into the twentyfourteen directory and activate that theme, I am seeing the debug message when I'm on the group listing page. However, when I use my custom theme, the message is not showing up.
This tells me that the template hierarchy is not being applied on my theme. Why could that be?
I suspect that somehow my theme is being treated as a legacy theme, I don't understand why though. I commented out the whole functions.php to make sure it's not because of aynthing in there. The header comment in the style.css does not contain anything special either.
Any help on this?
Thanks.
The problem was my own mistake. Our theme stylesheet had a Template: bp-default in it. I didn’t notice it at first because our theme is named similarly and my mind read it as the title of our theme. If I remove it, my templates are included.
For anyone stumbling on this problem in the future, here are the reasons why the template hierarchy could be deactivated by Buddypress:
Theme compat is disabled when a theme meets one of the following criteria:
1) It declares BP support with add_theme_support( 'buddypress' )
2) It is bp-default, or a child theme of bp-default
3) A legacy template is found at members/members-loop.php. This is a
fallback check for themes that were derived from bp-default, and have
not been updated for BP 1.7+; we make the assumption that any theme in
this category will have the members-loop.php template, and so use its
presence as an indicator that theme compatibility is not required
https://buddypress.org/support/topic/default-theme-is-still-showing/

Cannot add custom page template to my child theme

I'm running Wordpress 3.3.1.
I'm writing a child theme that modifies the default twentyeleven theme. Everything seems normal, except that when I add a custom page template, it doesn't appear in the add/edit screen (so I can't use it!).
To elaborate on "normal", here's what IS working:
My child theme appears and activates normally.
My CSS code (in style.css) is appearing.
My files from the template hierarchy are working (ex: front-page.php, page.php)
I've read and reread the codex, and my custom page template file ("coming-soon.php") seems to have the correct header:
<?php
/*
Template Name: Coming Soon
*/
So why won't it show up under the "Template" drop-down???
I've added custom templates dozens of times and never had this problem. The only possible difference I can think of is that I'm writing a child theme (even though the codex says this shouldn't matter), or perhaps it's a difference in the newest update of WP.
I can't duplicate what you're seeing with a clean install of WordPress 3.3.1. I have a theme with just two files, style.css, containing:
/*
Theme Name: stackoverflow-8946077
Template: twentyeleven
Version: 0.0.1
*/
#import url("../twentyeleven/style.css");
and coming-soon.php, containing:
<?php
/*
Template Name: Coming Soon
*/
get_header();
?><h1>Coming Soon</h1><?php
get_footer();
?>
the first part of which was copied from your question.
I see the template as expected:
The only things I can think of are to double-check:
the file exists on the server you're running on
the file's in the child template's directory (though it should work if it's in the twentyeleven directory)
there's no file with the same name in the twentyeleven directory, which (I think) would take precedence
the file name ends in .php
you only have a single space between "Template" and "Name:" (the regex used contains the literal Template Name:)
Failing that, the dropdown is populated by the get_page_templates function in wp-admin/includes/theme.php. Might be worth sticking some debug code in there to see if the $templates variable includes coming-soon.php.
This is an old thread. But if anyone is looking for solutions now, it may be the issue in WP 4.9. More details: Templates not working properly
In my situation, it ended up being the file permissions. I set it to 755 or whatever the standard WP permission is (in regards to security) and it worked!
Mine also ended up being the file permissions.
I set it to 777, and it worked like a charm!

Why is style.css breaking my custom Wordpress theme?

I have a clean install of WP 3.0.1, installed through cPanel and have created a directory for my new theme at /wp-content/themes/mytheme.
With an empty directory, the theme does not appear in the theme manager of the WP backend (as expected). If I add any PHP files (e.g. "page.php"), a warning appears in the theme manager that "mytheme" is broken because there is no style.css (again, as expected). But when I add style.css to the directory, the warning disappears and my theme is nowhere to be found in the theme manager. What's going on here?
Inside your style.css file you have to make sure that you are calling the default settings which wordpress will pick up, if you open up the default theme 'twentyten/style.css'
you will see this at the top..
/*
Theme Name: Twenty Ten
Theme URI: http://wordpress.org/
Description: The 2010 theme for WordPress is stylish, bla bla bla
Author: the WordPress team
Version: 1.1
Tags: black, blue, white, two-columns, fixed-width, etc..etc..etc..
*/
this has all the information wordpress needs inorder to include that theme in your appearence section.
once you have this inside your 'Mytheme' folder it will show up in the theme section, if you create a small png file called 'screenshot.png' add this inside your MyTheme folder, this will show up as the thumbnail for that theme... again look inside the twentyten folder and see how the files are arranged, this will give you a better understanding of how wordpress themes are built...
best thing to do while creating a new theme from scratch is possibly creating a copy of the twentyten folder and edit out all the un-required elements..
that gives you a good building block to work against.
or if you want there are a few themes out their which are naked themes, meaning they have the bearbones of what a theme needs then you can built upon..

Resources