Categories Title Change
-
Ok so I have successfully added my categories page and each category lists all of the posts on a new page when you click on the category. The problem is that when you are taken to the specific category page the title still displays as “Categories” rather than the respective category title. I am attaching my code from archive.php in the twentyfourteen theme.
<h1 class="page-title" style="text-transform:uppercase;"> <?php if ( is_day() ) : printf( __( 'Daily Archives: %s', 'twentyfourteen' ), get_the_date() ); elseif ( is_month() ) : printf( __( 'Monthly Archives: %s', 'twentyfourteen' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyfourteen' ) ) ); elseif ( is_year() ) : printf( __( 'Yearly Archives: %s', 'twentyfourteen' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentyfourteen' ) ) ); elseif ( is_category('22') ) : _e('Featured Articles', 'twentyfourteen'); else : _e( 'Categories', 'twentyfourteen' ); endif; ?> </h1>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Categories Title Change’ is closed to new replies.