Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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

Add additional filters to Archive Page

Old Jul 28, 2009, 10:06 AM
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?


Old Aug 6, 2009, 01:36 PM
Flynn's Avatar
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
/* get all options: */
include (TEMPLATEPATH '/functions/bfa_get_options.php');
get_header(); ?>
<table id="myarchive" border="0" cellspacing="0" cellpadding="0">
    <col style="width:33%">
    <col style="width:33%">
    <col style="width:34%">
    <h3>By Date</h3>
    <?php wp_get_archives('type=monthly&show_post_count=1&limit=0'); ?>
    <h3>By Category</h3>
    <?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' '')); ?>
    <h3>By Tag</h3>
    <?php wp_tag_cloud('format=list&orderby=count&unit=px&smallest=12&largest=12&number=0'); ?>
<?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:
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 {
bordersolid 1px #cccccc;

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 {

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.
Old Aug 7, 2009, 09:02 AM
11 posts · Jul 2009

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




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:23 PM.

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