if_homepage()

post image

This function is used to check if the user is on the homepage.

 

if you want to use this function you should use it in an if statement.

For example:

<?php

if (if_homepage()) {
echo 'this will only be displayed on the home page';
}

?>