How to make a home page

Post Reply
HowardB
Sr. Bludit
Posts: 40
Joined: Sat Jun 04, 2022 1:31 pm
Been thanked: 2 times

<?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
User avatar
rizqijune
Jr. Bludit
Posts: 6
Joined: Sat Dec 03, 2022 1:05 am
Location: Indonesia
Has thanked: 4 times
Been thanked: 1 time

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.
Another Script Kiddie :geek:
Post Reply