ThemeShaper Forums » Thematic

Archive template with tag list

(5 posts)
  • Started 4 years ago by Manuel
  • Latest reply from Manuel
  • This topic is resolved
  1. This “edited by me” template is obviously not working, and I know I should start to learn more about PHP than just copy & paste by trail & error, but could someone please fix this for me? (I just dropped <?php echo get_the_tag_list('<ul><li>','</li><li>','</li></ul>'); ?> in there.)

    <?php
    /*
    Template Name: Archive with Tags Page
    */
    ?>
    <?php get_header() ?>
    
    	<div id="container">
    		<div id="content">
    
    <?php the_post() ?>
    
    			<div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
        			<?php thematic_postheader(); ?>
    				<div class="entry-content">
    <?php the_content(); ?>
    
    <?php thematic_archives(); ?>
    
    <?php echo get_the_tag_list('<ul><li>','</li><li>','</li></ul>'); ?>
    
    <?php edit_post_link(__('Edit', 'thematic'),'<span class="edit-link">','</span>') ?>
    
    				</div>
    			</div><!-- .post -->
    
    <?php if ( get_post_custom_values('comments') ) comments_template() // Add a key/value of "comments" to enable comments on pages! ?>
    
    		</div><!-- #content -->
    	</div><!-- #container -->
    
    <?php thematic_sidebar() ?>
    <?php get_footer() ?>
    Posted 4 years ago #
  2. Hi Manuel,

    :)

    This can't work 'cause get_the_tag_list() delivers the tags of the current post. You can use it in single.php, in page.php, or in the loop.

    Just let me know what you're trying to do.

    Chris

    Posted 4 years ago #
  3. Oh, of cause you are right, Chris. Well, i would like to add the following to the thematic_archives function via functions.php:

    <?php if ( function_exists('wp_tag_cloud') ) : ?>
    <h2>Most popular keywords</h2>
    <?php $tag = wp_tag_cloud('format=list&unit=em&smallest=1&largest=1&orderby=count&order=DESC' );?>
    <?php endif; ?>

    Creating an extra template file for this and adding the code below <?php thematic_archives(); ?> works, but i think is a CSS mess to get this stuff display inline with the date & cat lists.

    Would be cool if I could remove “Archives by category” from the thematic_archives function as well, because I see no need to display both of them.

    Basically it should look like this:
    http://img188.imageshack.us/img188/427/archivesidea.png

    PS: Would be a cool thing to add such a “cat or tag” switch to the “Thematic Configuration Plugin”.

    Posted 4 years ago #
  4. This is what I am using right now as my archive template. Does it still make sense to edit <?php thematic_archives(); ?> now?

    <?php
    /*
    Template Name: Archive with Tags
    */
    ?>
    <?php get_header() ?>
    
    	<div id="container">
    		<div id="content">
    
    <?php the_post() ?>
    
    			<div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
    				<?php thematic_postheader(); ?>
    					<div class="entry-content">
    <?php the_content(); ?>
    
    <div id="archive_tag">
    	<h2>Keywords by popularity</h2>
    		<?php wp_tag_cloud('format=list&number=0&unit=em&smallest=1&largest=1&orderby=count&order=DESC' );?>
    </div>
    
    <div id="archive_date">
    	<h2>Sorted by month</h2>
    		<?php wp_get_archives('format=html'); ?>
    </div>
    
    					</div>
    			</div><!-- .post -->
    
    <?php if ( get_post_custom_values('comments') ) comments_template() // Add a key/value of "comments" to enable comments on pages! ?>
    
    		</div><!-- #content -->
    	</div><!-- #container -->
    
    <?php thematic_sidebar() ?>
    <?php get_footer() ?>
    Posted 4 years ago #
  5. Forgot to post the working version.

    You can see my archive at http://manuelmartensen.com/archive/ and here is the archive-with-tags.php:

    <?php
    /*
    Template Name: Archive with Tags/Keywords
    */
    ?>
    
    <?php get_header() ?>
    
    	<div id="container">
    		<div id="content">
    
    <?php the_post() ?>
    
    			<div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
    				<?php thematic_postheader(); ?>
    					<div class="entry-content">
    <?php the_content(); ?>
    
    <div id="archive_tag">
    	<h2>Sorted by Keyword</h2>
    		<?php wp_tag_cloud('format=list&number=0&unit=em&smallest=1&largest=1&orderby=name&order=ASC' );?>
    </div>
    
    <div id="archive_date">
    	<h2>Sorted by month</h2>
    		<ul><?php wp_get_archives('format=html'); ?></ul>
    </div>
    
    					</div>
    			</div><!-- .post -->
    
    <?php if ( get_post_custom_values('comments') ) comments_template() // Add a key/value of "comments" to enable comments on pages! ?>
    
    		</div><!-- #content -->
    	</div><!-- #container -->
    
    <?php thematic_sidebar() ?>
    <?php get_footer() ?>
    Posted 4 years ago #

RSS feed for this topic

Reply

You must log in to post.