简体   繁体   English

在本地编辑WordPress网站

[英]Editing WordPress Site Locally

I have created a WordPress site, which is saved on localhost and have been editing elements of my site, such as font color etc in 'Customiser' on WordPress. 我创建了一个WordPress网站,该网站保存在localhost上,并且正在编辑我网站的元素,例如WordPress上“ Customiser”中的字体颜色等。 However, it has become clear that you are restricted when editing this way. 但是,很明显,以这种方式进行编辑时会受到限制。 I am also used to creating pure HTML sites, so would rather edit the code locally. 我也习惯于创建纯HTML网站,因此宁愿在本地编辑代码。

I have all of the files I need downloaded and have started to edit the style.css but my question is, what is the best way to go about editing the php files and finding what you want? 我已经下载了所有文件,已经开始编辑style.css,但是我的问题是,编辑php文件并找到所需文件的最佳方法是什么?

For example: I know that if I go to 'footer.php', this is where I would edit the footer content. 例如:我知道如果我转到“ footer.php”,则可以在其中编辑页脚内容。 Is there a general way of knowing which section will be found in which PHP file, possibly using 'inspect elements'? 是否有一种通用的方法可以知道使用哪个“检查元素”在哪个PHP文件中找到哪个部分?

I know it is a broad question, but any advice when it comes to local WordPress sites would be appreciated. 我知道这是一个广泛的问题,但是有关本地WordPress网站的任何建议将不胜感激。 There does not appear to be much info out there about how to edit once you have made your WP site local. 将WP站点设置为本地后,关于如何进行编辑的信息似乎并不多。

The question is very broad, but I will do my best to answer. 这个问题很广泛,但是我会尽力回答。 You mentioned there not being much out there when it comes to editing WP locally. 您提到在本地编辑WP时没有很多。 I want to point out that there is a huge WP community online and that you can refer to the WordPress Codex for most answers. 我想指出,在线上有一个庞大的WP社区,您可以参考WordPress Codex获得大多数答案。 With that said, you can create custom page templates fairly easy. 话虽如此,您可以轻松创建自定义页面模板。 This will allow you to completely control the structure of the content. 这将使您可以完全控制内容的结构。 All of the documentation is located here: https://developer.wordpress.org/themes/template-files-section/page-template-files/#creating-custom-page-templates-for-global-use For existing sections of your site, you will need to just explore the files to get an idea of where everything is, as themes can vary in the way they are laid out. 所有文档都位于此处: https : //developer.wordpress.org/themes/template-files-section/page-template-files/#creating-custom-page-templates-for-global-use适用于您的站点,您将只需要浏览文件就可以了解所有内容,因为主题的布局方式可能会有所不同。 Unfortunately, I will not be able to help you more without more details. 不幸的是,如果没有更多细节,我将无法为您提供更多帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在本地使用多站点运行另一个Wordpress网站 - How to locally run another wordpress site with multisite 编辑WordPress网站的PHP网格页面 - Editing PHP grid page for WordPress site 在无法访问 WordPress 的 cpanel 中查找和编辑 WordPress 站点 - Finding and editing a WordPress site in cpanel w/o access to WordPress 使用服务器数据库在本地托管我的Wordpress网站 - Host my wordpress site locally using the server database 尝试在本地运行Wordpress网站时出现内存限制问题 - Memory limit issues when attempting to run Wordpress site locally 如何将 wordpress 站点(本地在 xampp 上)从一台计算机转移到另一台计算机 - How to transfer wordpress site (locally on xampp) from one computer to another 如何获取安装在远程服务器上的 Wordpress 站点的本地运行副本? - How to get locally running copy of Wordpress Site installed on remote server? 是否可以在本地运行完全构建的 wordpress 站点进行开发? - Is it possible to run completely built wordpress site locally for development? 编辑WordPress主题以类似于基于相同主题的另一个网站 - Editing a WordPress Theme to resemble another site based off same theme 模板结构的差异:Wordpress 传统主题与 FSE-(全站编辑)主题 - difference of template structure: Wordpress traditional themes vs FSE-(full site editing) themes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM