Page 1 of 1

How to make a home page

Posted: Sat Feb 17, 2024 6:31 pm
by HowardB
<?php
// Bludit content are pages
// But if you order the content by date
// These pages works as posts

// $WHERE_AM_I variable detect where the user is browsing
// If the user is watching a particular page/post the variable takes the value "page"
// If the user is watching the frontpage the variable takes the value "home"
if ($WHERE_AM_I == 'page') {
include(THEME_DIR_PHP . 'page.php');
} else {
include(THEME_DIR_PHP . 'home.php');
}
?>

Here page gets preference as it exists so how to i get home to show only at the site index
Does the main index.php have to be changed?

Many thanks for you assistance

Howard

Re: How to make a home page

Posted: Sun Feb 18, 2024 7:58 am
by rizqijune
I assume that you tried to display only the home section on the homepage? You don't need to change anything in index.php because it already states that if you visit any page other than page, it will show the home section.

What you want to change is the home.php file. You can play around in there to customize the homepage.