currentPage()

Description

Returns the slug of the current page. Useful with index_page() and is_index(), for example.

Note

If this tag does not work for you, try using the constant PAGE instead. See Examples below.

Usage

<?php 
    echo currentPage(); 
?>

Examples

Using PAGE constant instead

<?php 
    echo PAGE; 

    if ( is_index( PAGE ) ) { 
        // Fancy stuff 
    } 
?>