Forums

[resolved] Alternative Start Page (12 posts)

  1. j0d
    Member
    Posted 7 years ago #

    I'm not qutie sure to to explain this, but the closest example i can give is the BBC news website (http://news.bbc.co.uk). i wish to do somethign like this, with the latest posts from the different catagories, and posts marked headlines showing at the top.

    is there a way to make this, or should i use wordpress to display a number of entires and use CSS to display them in different areas

    any help would be appreciated. Thanks/

  2. Yngwin
    Member
    Posted 7 years ago #

    Depends how you want it exactly, but you probably need to do some coding for customizing a theme, then adjust the stylesheet for displaying it the way you want.

  3. iand
    Member
    Posted 7 years ago #

    You could try using home.php, which will be loaded as your front page in preference if it exists. As a starting point rename a copy of index.php and hack it as you want. For putting your posts where you want, get_posts or query_posts may be the way to go.
    http://codex.wordpress.org/Template_Hierarchy
    http://www.chrisjdavis.org/2005/06/13/secrets-pt-3/

  4. j0d
    Member
    Posted 7 years ago #

    thanks for the help, let me get this straight though, if i make a home.php out of index.php it will load home.php , is this correct?

    and therefore i can jsut create home.php in whatever style i want and it wont effect the layout of the other pages.

  5. iand
    Member
    Posted 7 years ago #

    Yes, home.php is only called for your starting page. Index.php, single.php etc.. will still be used in order of preference as described on the Template Hierarchy codex page.

  6. amory
    Member
    Posted 7 years ago #

    Check out this template file. It may be what you are looking for.

  7. j0d
    Member
    Posted 7 years ago #

    thats exactly what i'm looking for, just got to edit it for my layout now, thanks

  8. j0d
    Member
    Posted 7 years ago #

    as a follow up, i've created a home.php to my liking, but i dont have a index.php , what showuld i put on index.php to make it read home.php as the main page?

  9. skippy
    Member
    Posted 7 years ago #

    You need an index.php. All themes need an index.php.

    If you have both index.php and home.php, then WordPress will automatically use home.php for requests to the home page (that is: no query string).

  10. j0d
    Member
    Posted 7 years ago #

    so i can just have a blank index.php, or model it around single.php?

  11. skippy
    Member
    Posted 7 years ago #

    Did your theme originally come with an index.php?

    index.php handles all request for which a seperate template file does not exist. So, if you have a seperate template file for each of the items listed in the Template_Hierarchy, then you could conceivably get by without an index.php (or with a blank one).

    If you do not have a seperate template file for each element, then your index.php needs to be constructed to provide a Loop to handle all fall-through requests.

  12. j0d
    Member
    Posted 7 years ago #

    this is a self-created theme, thanks you'v been alot of help , am jsut going to stick a loop in the index.php that will display a "cannot display entries, please contact Admin with what you were trying to access", so i can create a page for what they were trying to access

Topic Closed

This topic has been closed to new replies.

About this Topic