WordPress.org

Ready to get started?Download WordPress

Forums

Make index.php the home page (7 posts)

  1. rainking
    Member
    Posted 5 years ago #

    I am currently using the Static Page function for my Front Page Display.

    Is there any way of making index.php the home page.

    For example:

    If someone types in http://www.mydomain.com they always get http://www.mydomain.com/index.php

  2. scribblerguy
    Member
    Posted 5 years ago #

    If you want to use the "index.php" of your theme as the front page, then disable the static home page. Go to Settings -> Reading Settings -> Front page displays and select the "Your latest posts" radio button.

    Technically, the "index.php" in the root of your WP install is the home page. Thanks to the wonders of PHP and MySQL, WP just applies your options to dynamically display the home page content of your choice, whether it's a "static" page or the index.php of your theme, which usually displays the most recent posts.

    Does that help? Or is there something else you are trying to do? If so, please be more specific.

  3. iridiax
    Member
    Posted 5 years ago #

    If you have template pages in your theme for every other purpose (single.php, archive.php, search.php, page.php, etc.), then the theme's index.php file is only used as your front blog page. For one site, I have customized mine to be more like a regular website home page instead of a blog.

    http://codex.wordpress.org/Template_Hierarchy

  4. rainking
    Member
    Posted 5 years ago #

    Hi Scribblerguy/iridiax,

    Thanks for responding to my post.

    I am using the Static Front Page option.

    The issue I have is really one to do with Adsense:

    My site is http://www.hybrid-cars.com.au

    When you go to that address you will see that the Ads relate to Blogging.

    But when you go to http://www.hybrid-cars.com.au/index.php (the same page) it shows the right contextual ads.

    So what I was hoping to do is find a SEO friendly way of when someone types in http://www.hybrid-cars.com.au they actually get http://www.hybrid-cars.com.au/index.php.

    The only way I could come up with was to do a 301 redirect.

    Any thoughts?

  5. saharanights
    Member
    Posted 5 years ago #

    I have the same problem and looked hi and lo for the fix but no one seems to know. :(

    I hope someone can help.

  6. snappermex
    Member
    Posted 5 years ago #

    Hi rainking,

    I see from your site it's working now, how did you fix it?

  7. kjagen
    Member
    Posted 5 years ago #

    Hi
    What theme is your page based on?
    How did you make those links below the header? Code in the header?
    And the style of the url? Is this termalinks?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.