WordPress.org

Ready to get started?Download WordPress

Codex

ar:Function Reference/is front page

Contents

وصف

This Conditional Tag checks if the main page is a posts or a Page. This is a boolean function, meaning it returns either TRUE or FALSE. It returns TRUE when the main blog page is being displayed and the Settings->Reading->Front page displays is set to "Your latest posts", or when is set to "A static page" and the "Front Page" value is the current Page being displayed.

هذا الوسم الشرطي يفحص ما إذا كانت الصفحى الرئيسة هي عبارة عن تدوينة أو صفحة. وهو عبارة عن بولين فنكشن، يعني أنه يرجع بنتيجة صحيح أو خطأ-FALSE.

Usage

<?php is_front_page(); ?>

Parameters

This tag does not accept any parameters.

Return Values

(boolean) 
True on success, false on failure.

Examples

If you are using a static page as your front page, this is useful:
<title>
<?php bloginfo('name'); ?> &raquo; <?php is_front_page() ? bloginfo('description') : wp_title(); ?>
</title>

Notes

Change Log

Since: 2.5.0

Source File

is_front_page() is located in wp-includes/query.php.

Related

See also index of Function Reference and index of Template Tags.