0

I have local Instance of WordPress and I want to edit the code of Pages which I created using WordPress Dashboard but I can't find those pages in my local environment folders so how can I find those pages .php files?

  • WordPress dynamically generate those pages using your current WordPress theme. To edit the markup around the content you entered, you'll need to edit the theme. There's lots of videos online for how to edit a WordPress themes, what to look out for, what child-themes are, and other important info. First result I found on Google: thethemefoundry.com/blog/edit-wordpress-theme-html – David Sword Aug 23 '18 at 22:08
0

Take a look at this answer to a similar question: How do I edit the php/html for a particular post?

You will need to understand how WP 'builds' a page. Page content is stored in the database. The output is generated through the theme's templates. The actual template used depends on the Template Hierarchy. The answer linked above will get you started in your learning.

0

First of all you need to understand how wordpress works. In your local wordpress instalation directory you can find only files that are responsible for markup and functionality. Those files contains some small pieces of code or functions. Wordpress is dynamically taking those pieces wchich currently need and combines them together. The actual .php file you see on your browser and it's not saved anywhere else. When you create page, post etc. wordpress is saving data into database. This data contains information about template, url of site, post_type and other important stuff. So every time you enter this specific site, or post wordpress will ask database for it's data. With this data wordpress will take appropriate template, functions and your saved content and merge them together into page.

Ok, so how can i edit my page?

There is 3 ways of doing that - 2 good and one bad.

1. Children theme. Using this method you can take any theme want and edit it in way you like.

2. Plugin With plugins you can add some functionality to your wordpress. It can be everything from small jQuery files, html, php to very complex plugins that can change work of everything you imagine includes database.

  1. Working on core files - not recomended Why?

Editing core functions may broke your site. Also when you're updating wordpress/theme/plugin some files may change and override your code. If you want to interfere into files always use plugin or theme/child-theme unless you know what you doing.

If you want to educate yourself and know more how to properly create code for wordpress - read about hooks/actions/filters. You can find plenty of tutorials out there.

You may also use those sites

Wordpress codex , Developer wordpress they provide inormous amout of information on this topic.

I hope now you know where to start. I wish you good luck with your wordpress journey!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.