Archives by date, WordPress check open

Archives by date, WordPress check

Approved. Code works!
This is exactly the working code that is verified by the moderator or site administrators

The is_date function will help us with this. This function allows us to check whether we are in the archive by date.

Example – check if we are on the archive page by date and display the archive name, if not display the page name by function wp_title (”).

<?php

if(is_date()) {
    the_archive_title('<h1 class="page-title">', '</h1>');
} else {
    wp_title("");
}

?>
0

More

Leave a Reply

Your email address will not be published. Required fields are marked *

How many?: 22 + 22

lil-code© | 2022 - 2024
Go Top
Authorization
*
*
Registration
*
*
*
*
Password generation