Difference between revisions of "WordPress is archive function"
From Wiki @ Karl Jones dot com
Karl Jones (Talk | contribs) (Created page with "In WordPress, '''is_archive''' is a WordPress function which test whether or not the current page is an Archive Page. == Description == An...") |
Karl Jones (Talk | contribs) (→See also) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
In [[WordPress]], '''is_archive''' is a [[WordPress function]] which test whether or not the current page is an [[WordPress Archive Page|Archive Page]]. | In [[WordPress]], '''is_archive''' is a [[WordPress function]] which test whether or not the current page is an [[WordPress Archive Page|Archive Page]]. | ||
| + | |||
| + | It is used as a conditional [[WordPress Template Tag|Template Tag]]. | ||
== Description == | == Description == | ||
| Line 19: | Line 21: | ||
== See also == | == See also == | ||
| + | * [[WordPress Archive Page]] | ||
| + | * [[WordPress function]] | ||
* [[WordPress Tag]] | * [[WordPress Tag]] | ||
* [[WordPress Template]] | * [[WordPress Template]] | ||
Latest revision as of 18:03, 25 October 2016
In WordPress, is_archive is a WordPress function which test whether or not the current page is an Archive Page.
It is used as a conditional Template Tag.
Description
An Archive is a Category, Tag, Author, Date, Custom Post Type or Custom Taxonomy based pages.
This is a boolean function, meaning it returns either TRUE or FALSE.
The function is used as a conditional WordPress Tag, like this:
<?php
if ( is_archive() ) {
// write your code here ...
}
?>
See also
External links
- Creating an Archive Index @ codex.wordpress.org
- Building A Custom Archive Page For WordPress @ Smashing Magazine