Support » Theme: Tiny Framework » Category Archive page, linked list only

  • Resolved kaethy

    (@kaethy)


    I want to create an archive.php file that will list every post in a category when you click on any category, each post title being a link, and not displaying the content.
    I know I’ll have to create a child theme.

    get_template_part( 'template-parts/content', get_post_format() );

    I can’t figure out where the code is in the above line. Where are template-parts?

    Any suggestions?

    TIA

Viewing 1 replies (of 1 total)
  • Theme Author Tomas Mackevicius

    (@tomasm)

    In main theme there is a folder template-parts and inside of that folder is file content.php. Copy this file to a child them folder and iclude it under same folder name it is in parent theme, then look for code:

    			<?php else : ?>
    
    				<?php tinyframework_post_thumbnail(); // Tip40 - Function located in: inc/template-tags.php ?>
    
    				<h2 class="entry-title" itemprop="headline">
    
    					<?php the_title( '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark" itemprop="url">', '</a>' ); ?>
    
    					<?php if ( ! post_password_required() && get_comments_number() ) : ?>
    
    						<span class="title-comment-meta">
    							<?php comments_popup_link( '<span class="leave-reply">' . esc_html__( 'Leave a comment', 'tiny-framework' ) . '</span>', esc_html_x( '1', 'comments number', 'tiny-framework' ), esc_html_x( '%', 'comments number', 'tiny-framework' ) ); ?>
    						</span>
    
    					<?php endif; // have comments ?>
    
    				</h2>
    
    				<?php tinyframework_excerpt_top(); // Tip41 - Function located in: inc/template-tags.php ?>
    
    				<?php // Tip26b - Print HTML bellow post title with meta information (date/time and author) for the index/archive views. To show, uncomment CSS rules in style.css ?>
    
    				<div class="entry-meta">
    
    					<?php tinyframework_entry_meta_top(); // Function located in: inc/template-tags.php ?>
    
    				</div><!-- .entry-meta -->
    
    			<?php endif; // is_single() ?>

    And probably you will have to modify it to:

    			<?php else : ?>
    
    				<h2 class="entry-title" itemprop="headline">
    
    					<?php the_title( '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark" itemprop="url">', '</a>' ); ?>
    
    					<?php if ( ! post_password_required() && get_comments_number() ) : ?>
    
    						<span class="title-comment-meta">
    							<?php comments_popup_link( '<span class="leave-reply">' . esc_html__( 'Leave a comment', 'tiny-framework' ) . '</span>', esc_html_x( '1', 'comments number', 'tiny-framework' ), esc_html_x( '%', 'comments number', 'tiny-framework' ) ); ?>
    						</span>
    
    					<?php endif; // have comments ?>
    
    				</h2>
    
    			<?php endif; // is_single() ?>
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.