• Resolved hatschiii

    (@hatschiii)


    I have a taxonhomy called ‘highlights’
    This taxonomy has 3 lists: A, B and C
    I can asign each post to A, B and / or C

    When I open the URL ‘www.domain.com/highlights/a’ I get a custom list of posts.

    So far so well. Within the page there is an header and this is static named ‘Archive’. What I want to get displayed is the name of the list (A, B or C). …and I have no idea what to change, just where it needs to be changed. Hope someone can give me a tip ??

    My template is calling the archive.php with the following content where I need to change the “_e( ‘Archive ‘ ” area:

    <?php
    get_header(); ?>
    		<div id="content">
    			<div class="pagetitle pagetitle_blog">
    				<div class="container">
    					<div class="gutter clearfix">
    						<h5><?php
    						if ( is_day() ) :
    							printf( __( 'Daily Archives: %s', 'kage' ), '<span>' . get_the_date() . '</span>' );
    						elseif ( is_month() ) :
    							printf( __( 'Monthly Archives: %s', 'kage' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'kage' ) ) . '</span>' );
    						elseif ( is_year() ) :
    							printf( __( 'Yearly Archives: %s', 'kage' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'kage' ) ) . '</span>' );
    						else :
    							_e( 'Archive ', 'weteg' );
    						endif;
    						?></h5>
    					</div>
    				</div>	
    			</div> <!--  END pagetitle  -->
    			<div class="container">
    				<div class="sidebar_right clearfix">
    					<section class="pagesection">
    						<div class="gutter">
    							<?php while (have_posts()) : the_post(); ?>
    							<?php get_template_part( 'content', 'posts');  ?>								
    							<?php endwhile; ?>	
    							<p class="simplepag">
    									<span class="prev"><?php next_posts_link(__('Previous Posts', 'kage')) ?></span>
    									<span class="next"><?php previous_posts_link(__('Next posts', 'kage')) ?></span>
    							</p>
    						</div>
    					</section>
    					<?php  get_sidebar(); ?>
    				</div>
    			</div>
    		</div>
    <?php get_footer(); ?>
    • This topic was modified 6 years, 1 month ago by hatschiii.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter hatschiii

    (@hatschiii)

    Is this difficult to solve?

    • This reply was modified 6 years, 1 month ago by hatschiii.
    Plugin Author Cristian Antohe

    (@sareiodata)

    Hi,

    You’ll need to replace _(Archive) with something like this:

    
    the_archive_title( '<h1 class="page-title">', '</h1>' );
    

    I’m not 100% sure this will work, but you can checkout the twentyseventeen/archive.php file for how that theme is doing it.
    https://themes.svn.www.ads-software.com/twentyseventeen/1.7/archive.php

    Thread Starter hatschiii

    (@hatschiii)

    Thanks! Looking im other themes was the hint I needed. This is how other themes are doing it:

    `<?php
    the_archive_title( ‘<h1 class=”page-title”>’, ‘</h1>’ );
    ?>`

    the_archive_tile prints “List: ABC” …but I wanted to print only ABC, so I was looking for another function. single_cat_title is the right one! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Print list name’ is closed to new replies.