• Resolved chickspirit

    (@chickspirit)


    I am using index.php in my child theme to change a few things in the Category and Monthly Archive pages of my blog.

    I searched around and got this to work for my Category Archive pages.

    <?php if( is_category() ) { ?><h1 class="entry-title full-title" style="padding-bottom: 100px; text-align: center;"><?php single_cat_title(); ?></h1><?php } ?>
    }

    It is located after this code:

    <div id="main-content">
    	<div class="container">
    		<div id="content-area" class="clearfix">
    			<div id="left-area">

    Link to Category Archive Page that is working.

    Not sure what to do to have a similar page title show up for my Month Archive pages.
    Link to Month Archive Page where there is no title.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello chickspirit,

    Please add the below code to show your Month Archive pages title:

    <h1 class="entry-title full-title" style="padding-bottom: 100px; text-align: center;">>
        <?php if ( is_day() ) : ?>
            <?php printf( __( 'Daily Archives: <span>%s</span>', '' ), get_the_date() ); ?>
        <?php elseif ( is_month() ) : ?>
            <?php printf( __( 'Monthly Archives: <span>%s</span>', '' ), get_the_date( _x( 'F Y', 'monthly archives date format', '' ) ) ); ?>
        <?php elseif ( is_year() ) : ?>
            <?php printf( __( 'Yearly Archives: <span>%s</span>', '' ), get_the_date( _x( 'Y', 'yearly archives date format', '' ) ) ); ?>
        <?php else : ?>
            <?php _e( 'Archives', '' ); ?>
        <?php endif; ?>
    </h1>

    Thanks

    Thread Starter chickspirit

    (@chickspirit)

    Awesome! Tweaked it a bit but that got it showing up.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add Page Title to Monthly Archive Pages’ is closed to new replies.