Why I can't find the current theme file in wp-content/theme
-
Hello,
I am new here to use WordPress building up my website, I would like to edit my current theme file to customize css and php functions to implement some feature to my site. However, I do not see the current theme file in wp-content/theme file, is there have any possible way to locate the current theme file?
My current theme is ClubNature (version 1.0.1), and inside my wp-content/theme only have twentytwenty, twentytwentyone and twentytwentytwo. -
Hi there,
Is this when you’re accessing your site via SFTP? All themes on your site should be listed in the
/wp-content/themesfolder. If that’s not what you’re seeing, please contact live chat support at https://wordpress.com/help/contact so we can look into this for you.That said, editing your theme files directly is not a good way to make modifications to your theme. A tiny mistake, like just forgetting a semi-colon, can cause your entire site to crash, and the next time the theme author releases an update for the them, all the changes you made will be lost.
To make CSS changes to your theme, you can add custom CSS code at Appearance ->Customize in the dashboard. CSS added there will load last when your site loads in a browser, so will automatically override the stylesheets built into your theme, and those changes are saved in your site’s database so will persist through theme updates, and even if you switch to another theme and back again.
And for custom PHP functions you can use the Code Snippets plugin:
Your other option is to create a child theme of your current theme, and add your changes to the child theme instead. We have some information to get you started in creating a child theme at the link below, but we don’t provide support for this process, and as ClubNature isn’t a theme that’s made by us you’ll need to contact the theme developer directly should you need any help with that process.
https://wordpress.com/en/support/themes/child-themes/
Note that your plan gives you access to both live chat and direct email support. You can reach those at any time by clicking the Help icon that appears bottom-right on all the My Sites pages, or else via the direct link at https://wordpress.com/help/contact
-
Hello kokkieh,
Thank you for your reply. I am using the wp plugin File Manager to access wp files, I am not sure that is it via SMTP to access. And now I can see the disadvantages of mortifying the wp files directly, I will try to create a custom CSS rule set and PHP functions via the plugin you suggested.
furthermore, the feature I would like to add is to create a simple login system, and set permission for the site visitor to access a specific page, which the site visitor will have a valid username and password. I can only find a plugin is using a WordPress account to verify the user role and permission, but it is not what I want. Is it able to do in WordPress? Or could you give me some advice, thank you so much. -
Hi @aacsb2022,
For file management, we suggest using SFTP. Many file manager plugins are incompatible with WordPress.com, as outlined here: https://wordpress.com/support/incompatible-plugins/#database-file-system-altering-plugins
With regards to setting up a membership site, I suggest considering using a third-party plugin from WordPress.org: https://wordpress.org/plugins/search/membership/
I hope that helps and please reach out again if you have any further questions.
-
hello staff-sheva,
Thank you for your suggestion, I have found another plugin to fulfill what I need.
- The topic ‘Why I can't find the current theme file in wp-content/theme’ is closed to new replies.