Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Add additional filters to Archive Page


  #1  
Old Jul 28, 2009, 10:06 AM
JournalStone
 
11 posts · Jul 2009
Atahualpa 3.4

Is it possible to add additional filters on the archive page? Currently I am displaying Archives by Month and Archives by Category. I'd like to also display Archives by Tags. Is this possible? If so, could it be formatted in an additional column?

http://journalstone.com/archives/

Thanks.
  #2  
Old Aug 6, 2009, 01:36 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
I suggest to create a new page template instead of editing functions/bfa_post_parts.php, which is where the code for the default archives page is located.

To create a archives page template, create a new file in a text editor and paste this content into it:

PHP Code:
<?php /*
Template Name: Archives
*/ 
?>
<?php     
/* get all options: */
include (TEMPLATEPATH '/functions/bfa_get_options.php');
get_header(); ?>
<table id="myarchive" border="0" cellspacing="0" cellpadding="0">
<colgroup>
    <col style="width:33%">
    <col style="width:33%">
    <col style="width:34%">
</colgroup>
<tr>
<td>
    <h3>By Date</h3>
    <ul>
    <?php wp_get_archives('type=monthly&show_post_count=1&limit=0'); ?>
    </ul>
    </td>
<td>
    <h3>By Category</h3>
    <ul>
    <?php wp_list_categories('title_li=&orderby=name&order=ASC&show_count=1&depth=0&feed_image=' 
    
get_bloginfo('template_directory') . '/images/icons/feed.gif' '')); ?>
    </ul>
</td>
<td>
    <h3>By Tag</h3>
    <ul>
    <?php wp_tag_cloud('format=list&orderby=count&unit=px&smallest=12&largest=12&number=0'); ?>
    </ul>
</td>
</tr>
</table>
<?php get_footer(); ?>
Save the file as archives.php and upload it into the Atahualpa directory on your web hosting account.

If every column gets the same width anyway, then this part

PHP Code:
<col style="width:33%">
<
col style="width:33%">
<
col style="width:34%"
can be replaced with the shorter:

PHP Code:
<col><col><col
in the above code.

To customize the output for each one of the three lists, see http://codex.wordpress.org/Template_Tags/wp_tag_cloud,
http://codex.wordpress.org/Template_...ist_categories and http://codex.wordpress.org/Template_...p_get_archives.

To style the columns, use a CSS insert to add styling to the <TD> columns of the table

PHP Code:
table#myarchive td {
    
vertical-aligntop;
    
background#eeeeee;
    
bordersolid 1px #cccccc;
    
padding10px;

The width of the columns must be controlled through the "col" selector

PHP Code:
<col style="width:33%"
This does not have to be inline, you could also use:

<col class="col1">

plus a CSS Insert:

PHP Code:
col.col1 {
    
width200px;


Create a page in Wordpress with a title but no content and choose "Archives" as the page template in the drop down select menu at the top right of the "Posts" -> "Edit" or "Add New" page.
  #3  
Old Aug 7, 2009, 09:02 AM
JournalStone
 
11 posts · Jul 2009
Flynn,

You rock! I'll play with this over the weekend.

Thanks!

JournalStone

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Images in post not showing on Category, Archive, or Tag page Tart Atahualpa 3 Wordpress theme 9 Jan 21, 2011 12:47 PM
Return to the page2cat/archive page issue lhanft Plugins & Atahualpa 3 Jul 23, 2009 08:59 AM
How to make an Archive Page? HalfWayThere Atahualpa 3 Wordpress theme 13 May 5, 2009 07:42 PM
Edit Category Archive Page saniol Atahualpa 3 Wordpress theme 0 Mar 20, 2009 12:52 PM
Archive Page Problems adashofsass Atahualpa 3 Wordpress theme 4 Mar 9, 2009 11:08 AM


All times are GMT -6. The time now is 02:34 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.