How to edit homepage?

by kevd10
4 replies
  • WEB DESIGN
  • |
I am getting a little confused. I want to do something as simple as add a block of text to the main body part of my wordpress homepage. I am looking through all of the .php files, and it seems I get sent on a wild goose chase while trying to make sense of it. How can I work out which template file is being used for my homepage? Even if I do find the correct template file, it seems as though there is little to no HTML contained within the file :S
#edit #homepage
  • Profile picture of the author shahriyar
    Well, it depends on which template you are using & where exactly you are trying to place the text. Usually the footer.php will have the HTML of the site footer. The header.php usually contains the site's head script/css and also part of the top body of the site.

    "How can I work out which template file is being used for my homepage? "
    You can find the active theme here => http://www.yourdomain.com/wp-admin/themes.php

    Hope this helps.
    {{ DiscussionBoard.errors[8785353].message }}
  • Profile picture of the author nettiapina
    Here's a document that explains how the template files are loaded. It's mentioned in there, but mind the difference between home page and front page.
    Template Hierarchy « WordPress Codex

    Some themes hide the HTML, others don't. There are many ways to code a theme, and quite hard to give instructions for editing one without knowing what you're dealing with.
    Signature
    Links in signature will not help your SEO. Not on this site, and not on any other forum.
    Who told me this? An ex Google web spam engineer.

    What's your excuse?
    {{ DiscussionBoard.errors[8787607].message }}
  • Profile picture of the author RobinInTexas
    Originally Posted by kevd10 View Post

    I am getting a little confused. I want to do something as simple as add a block of text to the main body part of my wordpress homepage. I am looking through all of the .php files, and it seems I get sent on a wild goose chase while trying to make sense of it. How can I work out which template file is being used for my homepage? Even if I do find the correct template file, it seems as though there is little to no HTML contained within the file :S
    It's totally different, depending on the theme you are using, and whether you are using a static "page" or your latest posts for the home page. You need to spend some time at the WordPress.org site to learn how WordPress works.

    Most of what is displayed on a post comes from the mySQL database and is extracted by something like this
    PHP Code:
    <?php /* The loop */ ?>
                <?php while ( have_posts() ) : the_post(); ?>
                    <?php get_template_part'content'get_post_format() ); ?>
                <?php endwhile; ?>

                <?php twentythirteen_paging_nav(); ?>

            <?php else : ?>
                <?php get_template_part'content''none' ); ?>
            <?php endif; ?>
    Signature

    Robin



    ...Even if you're on the right track, you'll get run over if you just set there.
    {{ DiscussionBoard.errors[8788475].message }}
    • Profile picture of the author RonaldKoury
      [DELETED]
      {{ DiscussionBoard.errors[8857486].message }}
  • Profile picture of the author Jasonsmith123
    find the active themes, go to appearance and then edit theme. You won't find better option than that.
    Signature

    Software & Web Development at Miracle Group

    {{ DiscussionBoard.errors[8857818].message }}

Trending Topics