Support » Themes and Templates » Changing template for posts and pages?

  • Hello, i’m newbie in using wordpress and i’m interesting how i can change template for every post and page, putting image etc ? in which file? i look at template.php and i seen pure php and i don’t know could wordpress support any bacis html codes?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Leave the files alone!
    All your content, like posts, Pages, comments etc. are stored in the database.
    You can NOT change the template for every post.
    You can insert images while writing the post.

    Apologies if this reply is too simple, but you say “newbie” and it took me awhile to understand the WordPress model. [Yes, everything is documented, but it’s sometimes not easy to tell where to start.]

    I’m assuming you’re running WordPress on a server where you have FTP access.

    The “look and feel” of all your pages and posts is handled by the “theme” files. You’ll find the theme(s) in the wp-content/themes subdirectories. You can install new themes (from, say, by unzipping the theme files and moving them (via ftp or another tool) to a subdirectory of wp-content/themes. Then, in your browser, go to the WP Admin, Presentation > Themes and select the one you want to use on the site.

    Once you’ve got a theme that’s “close” to what you want, you can modify it to have custom HTML features that you’d like. From WP Admin screen, go to Presentation > Theme Editor and you’ll see the files that make up the theme. You can edit them from that window, or, if you have a preferred web development tool you can edit them locally and upload via FTP .

    Most theme files are named with a scheme that makes it fairly easy to tell which one you need to edit — to put your picture somewhere in the header file, edit the header.php file (listed as Header in the Theme Editor). You’ll see that these theme file are a “mixture” of PHP and HTML. If you don’t want to change the PHP, just be sure to leave the lines bracketed with <?php and ?> alone.

    On the other hand, even if you don’t know PHP, if you’ve any programming experience at all, you may be able to figure out what the pieces of code are doing and modify them. If not, be sure to choose a theme that is “widget enabled” that will allow you to make modifications to the “dynamic” part of the look and feel without editing the theme files.

    Key sections of the Codex that help with getting started:

    Hope that helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing template for posts and pages?’ is closed to new replies.