I've been making a basic custom theme and everything was working fine. I had just finished pretty much styling everything in the blog section, left my computer for around 10 mins came back and it reverted back to the default twentyfourteen theme, claiming that my theme file was missing ('the template file'). I double checked and the file is still there so no idea what is going here?
This is what the top of my CSS looks like:
/*
Theme Name: AppTh.at
Theme URI: http://shjohnson.co.uk
Author: Samuel Johnson
Author URI: http://www.shjohnson.co.uk
Description: A simple theme developed to market AppTh.at's products
Version: 1.0
This theme, like WordPress, is licensed under the GPL.
AppThat is part of the MonkeyFind Brand
*/
Someone mentioned trying to add 'Template: appth.at' but that didnt seem to do anything except show up the theme then when i tried to activate it, it said it was broken?
How your directory structure should look like:
wp-content
themes
your-theme
index.php
style.css
Your CSS header looks fine, does your theme also has a index.php file? If not then you should add one this is required.
Adding Template: appth.at is not required, this is only needed when your creating a child theme, if you are then you should note the folder of the parent theme there. ie if you're creating a child theme for Twenty Eleven then you write: Template: twentyeleven
First the obvious:
you need to put the theme's folder in the WordPress theme directory
you need to have a style.css and a index.php
That should do it, but there may be other problems of course (even though the theme should show on the theme page).
WordPress codex offers clear information on theming:
http://codex.wordpress.org/Theme_Development#Theme_Stylesheet
http://codex.wordpress.org/Theme_Development#Template_Files
Related
I'm trying to use Ultimate Member plugin in my custom theme which I created from scratch. Well actually I downloaded this theme (freelancer) from startbootstrap.com and used it as a basis. I activated the UM plugin and added the default pages, but I'm not able to view those pages in my custom theme. Do you need to add any pages or functions in order to activate the UM plugin in a custom theme?
The plugin does work on default themes like twentynineteen. So I believe I should be missing something in my custom theme.
Here is the directory structure of my theme:
wordpress
wp-content
plugins
ultimate-member
themes
mytheme
assets //copied from bootstrap theme
author.php
css
style.css
footer.php
functions.php
header.php
index.php
js //copied from bootstrap theme
page-authors.php
page-{category-posts).php
single-post.php
style.css
ultimate-member
login-to-view
...
(and other files based on the article below)
I referred to this official article for template structure under /themes/mytheme/ultimate-member/ :
https://docs.ultimatemember.com/article/1516-templates-map
I was able to move forward when I added a singular.php file. I made additional changes on top of that but this file seemed to be the file I was missing.
I am creating a Wordpress custom theme, and I've been having issues with my woocommerce template rendering. Firstly, not all of the pages are showing up (some of them are reverting to the index.php and page.php files). Secondly, for the pages that are showing up (the single product page, the archive products page), the css is not being applied. I have tried everything suggested on the docs (hooks), but I have failed. Here is a link to my github for you to see the file structure.
https://github.com/naderae/elbe-collections
possible issues wuth my code:
my code is not written in the standard wordpress way. I only have three pages so far, index.php, page-about.php, and page-team.php, which work fine. page.php and single.php are empty. thus, my site consists of 2 pages, and index.php.
I've been struggling with this for 2 days, and would really appreciate some guidance of hoe to get me back on track. Cheers
Below is a list of some basic theme templates must preset in theme, more about this in details click here.
index.php
style.css
header.php
single.php
page.php
category.php
archive.php
404.php
I would recommend you to start with some default WordPress theme like twentyseventeen theme or other. These themes will have all basic functionality of WordPress. Check functions.php in the theme folder to customize/add functionality.
for more details about Template Hierarchy click here
Customize WooCommerce
Template structure & Overriding templates via a theme - link
Customizing WooCommerce - link
To overwrite woocommerce css you need to add a woocommerce folder to your theme. And go from there.
Woocommerce will also always use their own templates so the easiest way to change the layout is to use a child-plugin from woocommerce.
So i made a slideshow using HTML, CSS and JS.
It's for a personal blog i'm creating, so i would like to add the slideshow into a Wordpress theme that i purchased.
I created a child theme and tried to edit the function.php file and the style.css, and although i know some PHP it's really hard to understand how the code works and where to add mine.
Basically i want to display my slideshow initially, and then the rest of the Wordpress theme with all the posts and such.
Is it possible or should i only work with the customization options of the theme, although they're limited?
Since you've gone with a child theme, may I suggest copying a page template from the parent into your child theme?
Then you can copy your code for the slideshow via the editor into your child theme's copy of page template and use said template throughout your website for whatever page you'd like without colliding with parent theme updates.
Here's a relatively simple tutorial for creating a page template:
https://www.cssigniter.com/add-custom-page-template-using-child-theme/
Im using tyche theme for e-commerce.i have created template files for pages.like profile creating page.
Template file:
<?php
/*
Template Name: Create Profile
*/
when i assign this template for a wordpress page.Its working fine. but two or three days later that template files are missing from my theme folder. What i have to do Now. Please help me.
Thanks...
This is because when theme get updated all custom codes created by user, which resides in template folder, get replaced. So it is better to create a child theme and use it.
If you modify a theme directly and it is updated, then your
modifications may be lost. By using a child theme you will ensure that
your modifications are preserved
More here
Hi I'm new to wordpress I have been working on a theme I would like to have the original category.php file that needs to get added on the theme? I have tried to copy a category.php file from a theme that was created on the core of wordpress but the body is missing, where can I find the original category.php file template that will be used by wordpress when it is not being defined on my theme?
version: wordpress 3.5.1
As templates are going to have theme specific markup, you'll need to make revisions to any file that you plan on copying over if you want the page to work with your theme.
A simpler solution is to copy your page.php file and replace your post loop with that of the categories loop. This will allow you to easily maintain your site's design without having to rework any markup and can be accomplished pretty quickly by copy/pasting a category loop snippet.
A great starting place to see how these loops are structured is the WP twentytwelve theme found here: http://wordpress.org/extend/themes/twentytwelve
Much greater documentation can also be found in the codex here: http://codex.wordpress.org/Category_Templates
Template files are stored in:
/wp-content/themes/<theme_name>/
You can copy the category template from a theme, but then it wouldn't look like it's a part of your theme though and might be badly styled because of missing CSS rules.