Forums

[resolved] index vs home (7 posts)

  1. miowebdesigns
    Member
    Posted 6 months ago #

    I have content that I entered on the home page pages entry screen. It shows up on the home.php page but not on the index.php page. I am using <?php the_content(); ?> to bring the information to the pages. The problem is that the content from home shows up on home.php but not on index.php. I get content from the blog page and not the home page. Is there a command to use or a parm to set that will get the home post on the index.php page?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 6 months ago #

    If your site uses a static front page, do not use home.php in your theme's template files. Use front-page.php instead.

  3. miowebdesigns
    Member
    Posted 6 months ago #

    The site is for a photographer friend and I want him to be able to change the image on the front page without my help. Right now it is a bird lieberman. So I thought that if I let him make changes using pages update I can pull in whatever next image he uploads to the home page. I sort of have it working for home.php but i can't get index.php to act like home.php. What I am trying is a redirect `<?php
    if ( is_home() ) {
    include home.php
    } else if ( is_front_page() ) {
    include home.php
    } else {
    include 404.php
    }
    ?>`

  4. esmi
    Theme Diva & Forum Moderator
    Posted 6 months ago #

    Rename home.php to something else.

  5. miowebdesigns
    Member
    Posted 6 months ago #

    The problem is whether I use index, home or front page when you first visit the site it does not pull in the contents of home page until you click on the home menu button. I am trying to find a way have the page tel wordpress hey I am the home page and I need the home page content.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 6 months ago #

    If your site uses a static front page, do not use home.php in your theme's template files. Use front-page.php instead.

  7. miowebdesigns
    Member
    Posted 6 months ago #

    Thanks. That was the ticket. I guess I didn't see what I was doing as static. But in terms of word press it is.

Reply

You must log in to post.

About this Topic