treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Functioning WP Tag Cloud?

  • I'm having trouble getting the Wordpress WP Tag Cloud to work. I tried a couple of the widget plugins, but I can't figure how to get them to show up on this page to get the shortcode.

    Can anyone look over my PHP file and see what's wrong?

    The page I want it on is here, in the sidebar under the search box:
    http://www.parkarvidsonacupuncture.com/wordpress/nancy7/

    PHP file is here:
    http://www.parkarvidsonacupuncture.com/wordpress/wp-content/themes/ParkArvidson Wordpress/nancy_page.php

    Thanks!
    Adam
  • Adam,

    Could you please paste the contents of the nancy_page.php file here? Thanks.
  • while we are waiting for the code...I have to point something out that I noticed when looking at the site. The links are rather strange the way you have them. The way they are now is that the link only works if you hover over the text itself and not the link container itself. You have a big button to indicate to the user that it is a link and it is clickable....but you have the text clickable. Simply add display:block; to the (#sidebar a) selector in your css and you will see it functions much better.
  • Thanks springlab! Nice realization.
  • <?php
    /*
    Template Name: BLOG | Nancy Park Acupuncture
    */

    get_header(); ?>

    <div id="main-content">


    <div id="blog-wrap">
    <div id="nancy-archive">

    <img src="http://www.parkarvidsonacupuncture.com/wordpress/wp-content/themes/ParkArvidson Wordpress/images/Nancy_Photo.png" />

    <p><h2>Archives</h2></p>
    <!--SEARCH-->
    <div id="search">
    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
    <div class="searchinput"><input type="text"
    class="inputbox" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" />
    <input type="submit" id="searchsubmit" class="button" value="Search" />
    </div></div>

    <!--TAG CLOUD-->
    <?php
    wp_tag_cloud( array( 'taxonomy' => 'category' ) );
    ?>

    <!--ARCHIVE-->
    <p><?php wp_get_archives('category_name=Nancy'); ?></p>

    <p><ul>
    <?php
    global $post;
    $myposts = get_posts('numberposts=10&category=Nancy&order=DESC');
    foreach($myposts as $post) :
    ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endforeach; ?>
    </ul> </p>

    </div><!--NANCY-ARCHIVE!-->
    <div id="nancy-blog">

    <p><img src="http://www.parkarvidsonacupuncture.com/wordpress/wp-content/themes/ParkArvidson Wordpress/images/Nancy_Tree.jpg" /></p>

    <?php query_posts('category_name=Nancy&showposts=10'); ?>

    <?php
    if (have_posts()) : while (have_posts()) : the_post();
    ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><a href="<?php
    the_permalink();
    ?>"><?php
    the_title();
    ?></a></h2>
    <div class="entry">
    <?php
    the_content('<p class="serif">Read more &raquo;</p>');
    ?>
    <?php
    wp_link_pages(array(
    'before' => '<p><strong>Pages:</strong> ',
    'after' => '</p>',
    'next_or_number' => 'number'
    ));
    ?>
    </div>
    </div>
    <?php
    endwhile; endif;
    ?>



    </div><!--NANCY-BLOG!-->
    </div><!--BLOG-WRAP!-->

    </div>

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  • Can anybody answer this?