I'm creating my own WordPress theme and I've set it up locally with MAMP. It all works fine and the theme appears when I enter localhost/wordpress in my browser. But when I enter localhost/wordpress/wp-content/themes/mysitename it is just a white blank page.
In the WordPress dashboard under themes the image next to my theme where it lets you activate it is also blank.
How can I get it to appear? Thanks in advance!
WordPress uses a frontend controller system where all site traffic passes through the index.php file in the root of the site.
Directing your browser to "localhost/wordpress/wp-content/themes/mysitename" bypasses the main controller, which means you are bypassing WordPress altogether and attempting to directly access files on the server. That directory would need to have an index.html or index.php file within it to produce some kind of output.
In order to have an image beside your custom theme in the admin, you need to create a screenshot of your theme and name it "screenshot" (can be a jpg or png) and place it in the root folder of your theme. Look inside other WP theme folders for an example of what I am talking about.
Related
I am creating a Wordpress theme. I have index.php in my theme's root folder. I have my style.css in a separate folder /css. I've got the beginnings of the design done and everything is working fine.
I now want to add some options with Customizer. I've begun to add some in customizer.php. I then go to check what they look like in wp-admin, click "customize" on my theme and get...
"The active theme is broken. Reverting to the default theme."
The theme was working fine up until that point. I've deleted and re-installed it a couple of times now. All is well until I click "customize".
The error message instructs me to check index.php and style.css, both of which are present. Could it be because style.css is not in the root but in /css? If so, how do I get Customizer to recognise this? My stylesheet has been enqueued correctly in functions.php. As I say above, the theme works fine until I get involved with Customizer.
When I click theme details, wp seems to think the theme is a child of itself too. It isn't a child of anything. I am using underscores starter theme and adapting.
What is going on with Customizer and how do I fix it?
The style.css is a stylesheet (CSS) file required for every WordPress theme. It controls the presentation (visual design and layout) of the website pages. In order for WordPress to recognize the set of theme template files as a valid theme, the style.css file needs to be located in the root directory of your theme, not a sub-directory.
There must be connection lost when you update resulting to broken themes or missing files.
You need to reinstall a theme :
There are two ways to install WordPress themes.
Method 1.) Direct Upload inside WP Admin Console
Method 2.) Using an FTP Client
Method 1 is just a matter of uploading the theme from your WordPress admin console.
Once logged in, navigate to Appearance → Themes and click the "Install Themes" tab. Click the "Upload" link and browse to the location where you extracted the package and upload themename.zip.
Method 2 is pretty straightforward.
Using an FTP client is recommended. If the term FTP scares you, don't worry. It's no different than moving files and folders. Filezilla is a free and trusted FTP client.
Extract themename.zip to your local machine
Login via FTP to your web server and navigate to the /wp-content/themes/ folder
Upload the entire themename folder and its contents. Example: /wp-content/themes/yourtheme/
Open your browser, log in to your WP admin section and (in the left column under Appearance) click the Themes link .Click Activate under the theme you just uploaded.
I'm new to WordPress. I just successfully installed it on my site.
Now I'm trying to toy with creating my own custom theme. I created one with a custom index.php and a style.css. I zipped the folder, and uploaded it successfully from my WordPress admin by going to Themes > Appearance > Add New > Upload Theme, then browsing the zipped file. I activate the newly uploaded theme, and run my site's url, and lo and behold, the new theme gets loaded up in the browser. So far so good. But then when I look into my wp-content/themes folder in my web server through my ftp client, the newly uploaded theme isn't there. The default themes(twentyfifteen, twentysixteen and twentyseventeed) are all there but not my new theme. What could possibly be happening? Isn't that where the new theme should be?
Is there some crucial step in the installation of WordPress that I may have missed?
On the flip side, if I directly FTP to my new folder into the wp-content/themes folder in my web server, it doesn't show up in my Themes > Appearance page.
What gives? Please any hints/clues will be greatly appreciated.
To reveal weher is your theme
open your site
view page source in your browser (ctrl+u)
press ctrl+f to find this "wp-content/themes/" in the source
next word to "wp-content/themes/" is your loaded theme
There can be multiple WordPress installations on a single web server. Are you sure you are FTP'ing in to the correct web directory? Also, make sure you log in with the master credentials.
i developing a new theme for my website and i want to add 2 languages inside it. but every language have it's own folder inside theme.
so i created two Folders (en) and (ar) inside my wordpress theme which everyone include php files but when the website loaded i can't access them and got a white page without any code inside it.
example:
www.website.com/en/index.php
www.website.com/ar/index.php
how i can create them and access them like normal html pages?
please help me to fix this problem.
The index.php for your homepage isn't in your Theme folder: it's in the top directory of the WordPress install.
For me (on Apache) the index.php you are talking about is at:
/public_html/index.php
You're modifying the index.php that (for me) is found at:
/public_html/wp-content/themes/mythemename/index.php
I'm pretty sure what you're wanting to do would look like this:
/public_html/en/index.php
Let me know if that works!
I am editing a wordpress website. My client had a team working on editing it and they simply used the Wordpress editor to make changes. When I log in to cPanel, I see a 'coming soon' page in the index.html file. But the changes that the design team made cannot be located in any file. Also, when I access the website with a http, it shows the website (even when it's not supposed to be launched) and when I access the website with a https, it shows the welcome page. I don't know how two different pages are displayed by just changing the transfer protocol. How do I edit the theme?
If it is a WordPress website, the index file should be under this directory:
/website-root/wp-content/themes/ <- then the theme folder.
The theme, that's active on your website should be mentioned under Appearance > Themes. If you're not sure which one it is in /themes directory, look for the title here.
As you have cPanel, you should have an access to .HTACCESS file for your account. You can set index/default page for your website from .HTACCESS file. Please add the following code:
DirectoryIndex MyFileName.html // Replace MyFileName.html with your actual index file name.
HTTP and HTTPS should show the same contents. Please clear browser cache or verify your website from any alternate system or server.
I have a WordPress blog installed on my server but when i upload a image it goes into one directory, but the blog front end is looking for the images in another directory, so the images show as broken. I have been manually copying the uploaded images from server location to the one WP looks for them in and it works.
How can i set the WP blog to upload to the same dir on the filesystem that the WP front end is trying to pull from?
The problem is most likely WordPress failing to correctly guess the upload path and URL.
Go to Settings > Miscellaneous and hardcode the correct path and full URL.