How to define a PHP function to evaluate if url is frontpage?
How can I define a class to evaluate if url is frontpage and then use it
in my template?
Example:
The class:
public static function url()
{
#The code?
}
To use with this or other function in my template:
<?php if (front_page()): ?>
<p>This will shows only in frontpage</p>
<?php endif;?>
Thank you in advance
No comments:
Post a Comment