• I am sorry if I am repeating similar post but I don’t have time to scan (on lunch break). Basically I am coding up a theme which will have content that will only appear within the Home Page.

    I am somewhat new to WordPress (and PHP) but my HTML & CSS knowledge is pretty good.

    I want to include an introductory div with some links to pages within the blog and a tabbed area that will link off to recent & popular posts defined by post category.

    I have the basic HTML lined out, its pretty simple stuff I just wanted to know if it is best to hard code this into the index.php or if I should create some custom php files and use the ‘get’ command to make these divs display (but only on the homepage).

    Any advise or links to other posts would be greatly appreciated. I’ll be able to provide any further information if necessary.

Viewing 2 replies - 1 through 2 (of 2 total)
  • What you are saying is you want to code some permanent links that will appear only on your homepage? Its fine to code them in a WordPress template file, but you are better off customizing a PHP file for that purpose rather than modifying index.php. Start by copying the contents of index.php into a new php file.

    Info on custom page templates is here
    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    You would create a static page in WP, assign it to use your custom template, and then in Admin / Settings / Reading assign that custom page as your posts page.

    Thread Starter Sheixt

    (@sheixt)

    Thank you for the information Stvwlf.

    To clarify, the information will be links in an introductory div. Then down the page I intend to have a tabbed interface that will display the 5 most popular posts for a specific category (this is all controlled by divs).

    So if I understand you correctly, I should create a home.php page template and use a PHP ‘get’ decoration within the index.php to make the page visibile only on home?

    Please pardon my ignorance here. If someone could confirm this I would greatly appreciate this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customise index for content specific to homepage’ is closed to new replies.