• Resolved tropicaltidbits

    (@tropicaltidbits)


    Hello,

    I am new to WordPress and not too experienced yet with web development. I installed WP to a directory in my website, and I would like to know which file is getting displayed by my browser, so that I may edit it. I see that there are a lot of things tied into how WP displays stuff, but there must be a master html or php page that gets displayed? Hopefully from there, I can figure out how to change how the WP page is displayed (for example, remove the header/banner?).

    Any help with this would be appreciated.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter tropicaltidbits

    (@tropicaltidbits)

    I have read that this file should be “index.php”, but reading it gives me this:

    <?php
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     */
    
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define('WP_USE_THEMES', true);
    
    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');

    I looked at several of the other files that it references with no luck. Why isn’t the index.php the file displayed by the browser like it is supposedly supposed to be?

    Moderator cubecolour

    (@numeeja)

    Why isn’t the index.php the file displayed by the browser like it is supposedly supposed to be?

    Because it isn’t supposed to be. This is what makes WordPress so flexible. Each webpage in a WordPress site is built up from a combination of the WordPress core files, the files that make up the theme, plugins and data stored in the database. If it was a collection of static files there would be no point in using it would there? You’d just create a load of static files.

    Start here:
    http://codex.wordpress.org/Getting_Started_with_WordPress

    WP pages/posts are created dynamically from the server. Any changes are generally accomplished with css.

    Thread Starter tropicaltidbits

    (@tropicaltidbits)

    So then which file(s) would I edit to change what is displayed in the web browser? The admin GUI only gives options for tweaking the theme colors, font, etc. I want to be able to remove entire sections of the HTML if possible.

    Thread Starter tropicaltidbits

    (@tropicaltidbits)

    For example, look at this WP forum topic. That is something I would like to accomplish, but I don’t have a “header.php” file. I have a “wp-blog-header.php” file, but it is a very short php script with no HTML in it whatsoever for me to edit. Can anyone help with this?

    Moderator cubecolour

    (@numeeja)

    If you’re requesting help about editing a particular element on your site, you need to give some information to help people to help you.

    Tag the thread with the name of the theme, provide a link to your site and describe exactly what you are aiming to do.

    Thread Starter tropicaltidbits

    (@tropicaltidbits)

    That is only one specific thing that I would like to accomplish….this post is meant to be a request for the general file(s) to edit to accomplish tasks like the one above. I need the file with the HTML code in it so that I can manipulate it like the fellow did in the post I mentioned when he removed the home button.

    I have been very specific with what I want in this topic. Any help would be appreciated.

    Moderator cubecolour

    (@numeeja)

    I’m afraid if you can only ask general questions you will only get general answers.

    I need the file with the HTML code in it so that I can manipulate it like the fellow did in the post I mentioned when he removed the home button.

    As you have already been told, it is not a single file. If it was a single file you would have been given the answer already.

    If you can ask a specific question about editing a specific part of your page and are able to give enough information so that people can help you, you will be able to to make the change and it will serve as a learning exercise to help you along the WordPress learning curve.

    If you want to change how your site looks, you’ll have to read up on theme development.

    http://codex.wordpress.org/Theme_Development

    The files you need to edit are all there. That header.php file you mentioned will be in wp-content/themes/<theme-name>

    Don’t edit the default theme directly. Create a child theme instead or you’ll lose your changes when you update.

    http://codex.wordpress.org/Child_Themes

    Thread Starter tropicaltidbits

    (@tropicaltidbits)

    fonglh – Thank you. This is what I wanted to know.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Which file gets displayed by the web browser?’ is closed to new replies.