Question : trouble integrating certain wordpress features into site

there are three wordpress features i'd like to integrate into my index.php > blog, tag cloud and archives

i was able to get the blog working with the following:
1:
2:
3:
4:
5:
6:
7:
8:
9:
<?php 
/* Short and sweet */
define('WP_USE_THEMES', false);
require('../wordpress/wp-blog-header.php');
?>

<?php
require('../wordpress/wp-blog-header.php');
?>


1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
<?php
require('../wordpress/wp-blog-header.php');
?>

<?php
$posts = get_posts('numberposts=10&order=ASC&orderby=post_title');
foreach ($posts as $post) : start_wp(); ?>
<h2><?php the_title(); ?><br />
<span><?php the_date(); echo "<br />"; ?> </span></h2>
<?php the_excerpt(); ?> 
<?php
endforeach;
?>


so the blog works great, but how do i get the tag cloud and archive features working?  i've read several things online, especially this: http://codex.wordpress.org/Integrating_WordPress_with_Your_Website

any help is appreciated

Answer : trouble integrating certain wordpress features into site

Hi there

For the tag cloud, use something like this:
<?php if ( function_exists('wp_tag_cloud') ) : ?>
<li>
<h2>Popular Tags</h2>
<ul>
<?php wp_tag_cloud('smallest=8&largest=22'); ?>
</ul>
</li>
<?php endif; ?>

See here for details http://codex.wordpress.org/Function_Reference/wp_tag_cloud

For the archives page, you could use something like this (along with wp-blog-header.php)

<?php while(have_posts()) : the_post(); ?>

<h2>Categories</h2>
<ul><?php wp_list_cats('sort_column=name&optioncount=1') ?></ul>

<h2>Monthly Archives</h2>
<ul><?php wp_get_archives('type=monthly&show_post_count=1') ?></ul>

<?php endwhile; ?>

See eg. here for details http://wphacks.com/how-to-create-an-archive-page-for-your-wordpress-blog/

If you're going to want to do lots of things with WordPress though, I think you would be better off using WordPress properly, and therefore installing it in a subdirectory of your site: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

HTH
Matt
Random Solutions  
 
programming4us programming4us