• Resolved mechanicvirus

    (@mechanicvirus)


    I’m using PODS for custom taxonomy on 2 items titled: Sites and Channels. I have a template that displays a Category title as “Browsing Category: Category Name” but the 2 PODS pages only say “Archive”, I am curious if I could change it so it displays the Site or Channels POD item name instead?

    The current code reads as:

    <?php
    						if ( is_day() ) :
    							echo _e( '<span>Daily Archives</span>', 'solopine' );
    							printf( __( '<h1>%s</h1>', 'solopine' ), get_the_date() );
    
    						elseif ( is_month() ) :
    							echo _e( '<span>Monthly Archives</span>', 'solopine' );
    							printf( __( '<h1>%s</h1>', 'solopine' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'solopine' ) ) );
    
    						elseif ( is_year() ) :
    							echo _e( '<span>Yearly Archives</span>', 'solopine' );
    							printf( __( '<h1>%s</h1>', 'solopine' ), get_the_date( _x( 'Y', 'yearly archives date format', 'solopine' ) ) );
    
    						else :
    							_e( '<h1>Archives</h1>', 'solopine' );
    
    						endif;
    					?>
    

    The last part, between else and endif is where I’m stumped, it has “Archives” in the title, but I’m curious if theres a POD wordpress syntex I can enter instead of it simply displaying “Archives”?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Having PODS item display name on archive page title’ is closed to new replies.