8

I would like to manually edit the code my my wordpress pages. The WP interface only allows me to individually edit the CSS or PHP. The Page Edit feature gives me access to a certain part of the code, excluding the Body Tag.

Kindly help me locate my files on the server.

Thanks for your help!

:)

4 Answers 4

4

WordPress stores content in the database, there are not any physical files with the content of the pages(or posts). The theme's template files control how to render and display your site, you can find those files in wp-content/themes/YOUR-ACTIVE-THEME-NAME-HERE..

You can find lots of information on themes and their development here.
http://codex.wordpress.org/Theme_Development

Additional information and guidance can be found through the other documentation listed in the resources section of the above linked page, here it is for quick reference.
http://codex.wordpress.org/Theme_Development#Resources_and_References

A quick search of the WordPress forums would have also provided you with the information needed(just something to note).
http://wordpress.org/search/where+is+content+stored?forums=1

Hope that helps.

3

You can find your root HTML file in here: /public_html/wp-content/themes/"YOUR THEME NAME"/framework/templates A file named header.php has to be in there.

1
  • Thanks! Btw. for me now it was directly /public_html/wp-content/themes/{THEME}/header.php Commented Jun 7, 2018 at 18:08
1

Prateek,

Although it is theme dependent, many of the structural elements for your pages design are contained in the themes .php files. Go to DASHBOARD > APPEARANCE > EDITOR and you will see the files that make up the templates and in the case of some themes, sections of your displayed pages. You can go into these files using the WordPress editor or a text editor and make changes to the theme template itself, which may allow you to make the changes you desire (be sure to work from a copy until you are satisfied).

Using the Twenty-Ten theme as an example, you can find the < body > information in the header.php file.

0
0

The directory that you would find the files has been answered above. But I felt that there was more to add. The page.php file contains the framework for pages on your site that are not your home page, or your blog/posts page. Usually you will see things like

<?php get_header(): ?> 
<div class="container">
   <?php the_content(); ?>
</div>

As well as other things of course. But what is important there is that the document drops in and out of php at times, and in between is edit-able html. I hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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