WordPress.org

Ready to get started?Download WordPress

Forums

Display posts from month (when clicked) and WP_Tag_Cloud formatting (2 posts)

  1. petrescu
    Member
    Posted 5 years ago #

    Posted this in the other wordpress.com forum by mistake so posting it here too as this is hopefully the correct place.

    I'm sorry as these questions have probably been posted a good few times before but to be honest I don't know exactly what I'm searching for and as a result I don't know what keywords to use to help find a solution for my problems.

    My first problem I'm having is with my archive page. The concept behind this is something similar to that of Jason SantamMarias, which I’m sure many of you will have seen before - http://www.jasonsantamaria.com/articles/

    Similar to Jasons page setup I have assigned spaces for post, date and category. I have managed to pull the date (by month) and the assigned categories however what I have not been able to manage, as yet, is display the posts. I would like, just like Jason, to display posts from that current month but when you click on another month the posts that are being displayed change to show the posts from that month.

    After some research I have discovered I need to code in some sort of loop but due to being quite new to PHP and even newer to wordpress I have no clue as what this code would look like.

    My code currently resembles this, if it is of any use

    <?php get_header(); ?>
    
    <div id="content">
    <h1 class="subtitle">RAMBLINGS OF THE PAST</h1>
    <div id="col1">
    <h2 class="archives">Recent Entries</h2>
    Nonsense
    <?php $current_month = date('m'); ?>
    <?php $current_year = date('Y'); ?>
    <?php query_posts("cat=22&year=$current_year&monthnum=$current_month&order=ASC"); ?>
    </div>
    <div id="col2">
    <h2 class="archives">By Tag</h2>
    <p>
    <?php wp_tag_cloud('format=list'); ?>
    </p>
    </div>
    <div id="col3">
    <h2 class="archives">By Date</h2>
    <p>
    <?php wp_get_archives('type=monthly'); ?>
    </p>
    </div>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    </div>
    <?php endwhile; endif; ?>
    </div>
    <?php get_footer(); ?>

    Would I need to loop everything above to achieve what I am currently looking for?

    If anyone is able to help me I would be very, very grateful. I hope someone will answer this post but I also understand that posters can sometimes get very irritated by answering the same questions time after time.

    My second question is somewhat simpler, I think.

    In the above code snippet you can see the following

    <div id="col2">
    <h2 class="archives">By Tag</h2>
    <p><?php wp_tag_cloud('format=list'); ?></p>
    </div>

    However when wordpress generates this page, it assigns its own styling of

    <li><a href='#' class='tag-link-9' title='1 topic' rel="tag" style='font-size: 8pt;'>css</a></li>

    I’ve read after googling that this problem may be addressed by going into the includes folder and editing the widgets.php page but after looking through that I’m sure it’s not what I’m looking for.

    I want to take out all the styling and apply my own through css.

    Sorry about the relatively large post but I’m trying to give as much information as possible so that you may be able to help me solve the problems I’ve been having.

    Thanks for everyone that bothered to read down this far,

    Jack

  2. petrescu
    Member
    Posted 5 years ago #

    Right, I've partially fixed the first problem but still having bother with the second, hoping someone will be able to sort me out with a fix?

    I've tried !important in the css to overwrite the generated code without any luck. Does anyone know where this file is located in the includes?

Topic Closed

This topic has been closed to new replies.

About this Topic