php - wordpress custom theme not appearing in dashboard
so im new to wordpress and i just created a custom theme for my wordpress project inside my wp-content/themes/mytheme i added an index.php, blog.css and a style.css file to the new theme but when i go to themes in my dashboard the newly created theme is not shown as an option. what else am i missing? thanks
style.css
/*
Theme Name: Start WordPress
Theme URI: http://wordpress.org/themes/startwordpress
Author: Me
Author URI: http://wordpress.org/
Description: The Start WordPress theme is my first custom theme.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: bootstrap, black, brown, orange, tan, white, yellow, light, one-
column, two-columns, right-sidebar, flexible-width, custom-header,
custom-menu, editor-style, featured-images, microformats, post-
formats, rtl-language-support, sticky-post, translation-ready
Text Domain: startwordpress
This theme, like WordPress, is licensed under the GPL .
Use it to make something cool, have fun, and share what you've learned
with others.
*/
Answer
Solution:
Just for fun. Don't add a blog.css.
Just use style.css and the basic files until you can see it. While troubleshooting - just use the index.php and the style.css - and keep things trim.
https://codex.wordpress.org/Theme_Development#Basic_Templates
When a theme doesn't show up, there is often an error shown below in the theme admin.
Answer
Solution:
WordPress Themes typically consist of three main types of files, in addition to images and JavaScript files.
1 .The stylesheet called style.css, which controls the presentation (visual design and layout) of the website pages.
2 .WordPress template files which control the way the site pages generate the information from your WordPress database to be displayed on the site.
3 .The optional functions file (functions.php) as part of the WordPress Theme files.
Example: -
Follow the path of wp-content > themes to arrive at your themes folder. You’ll see the WordPress default themes – twentyfifteen, twentyfourteen, twentythirteen – and index.php. Create a new directory for your theme; I called mine startwordpress.
Just follow this link https://www.taniarascia.com/developing-a-wordpress-theme-from-scratch/
Answer
Solution:
Check that the theme files have the right file permissions and ownership.
CD to the root directory of your website, and then the ownership if your server is running Apache on Ubuntu can be set with: chown www-data:www-data -R *
Or for Apache on CentOS: chown apache:apache -R *
And the permissions:
find . -type d -exec chmod 755 {} \; # Change directory permissions
find . -type f -exec chmod 644 {} \; # Change file permissions
Answer
Solution:
if you have a multisite setup, you need to enable the theme at My Sites->Network Admin->Themes
Answer
Solution:
Bring the style file that contain the theme information inside