• Resolved Trevsweb

    (@trevsweb)


    looking for a sympathetic coder here πŸ˜€ I know your out there hehe

    working on my churches website we have a regular magazine which we now have an extensive archive I would like to use wordpress as a CMS

    I have the details for the rest of the site, in my head.

    Basically I need to post articles but group them by their issue number. The issue have multiple articles.
    such as

    Issue 118 – June 2009

    • article 1
    • article 2
    • article 3
    • Down the sidebar I need to list the issues and under each issue i need the related articles.

      I was planning on having the “magazine” as a catagory.
      having the issue’s article linked via a tag of “issue 118” etc or just “118”

      Then somehow looping (around 5 times) my example above (linking to the articles).
      then for the remaining issues just continue with a list showing just the issue numbers linking to the related blog posts

      any code or advice will be great. i shall return if i find a solution to help others in the future πŸ˜€

      cheers

      Trevor

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Trevsweb

    (@trevsweb)

    just a quick addition.
    i guess i could use and modify the archive page
    something like this would be great
    http://franklinbishop.net/archives/ but with the issue number somehow….

    i can always fake the date by modifying the dates within the posts.

    however! i will have a news catagory so i need to omit those posts somehow…

    Thread Starter Trevsweb

    (@trevsweb)

    right think ive found a way

    worked out how to get a single catgory up in a page

    <?php $query = new WP_Query('category_name=Review'); ?>
    <?php while ($query->have_posts()) : $query->the_post(); ?>
    
    post info
    
    <?php endwhile; ?>

    now working out how to list an archive like sidebar on the page

    worked out the coding just hive to find the snippits.
    eg

    catagory sort (as above) for "Review"
      loop
        meta get for issue number : post month
            loop
                post tile with permilink
            endloop
      endloop

    woop nearly there bad plugin has forced me to reinstall

    Thread Starter Trevsweb

    (@trevsweb)

    Right heres my code
    thanks to design_dolphin on topic http://wordpress.org/support/topic/275903?replies=7

    <?php
    	$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
    	$tt = $term->taxonomy . '=' . $term->slug;
    	global $post;
    	$query = 'numberposts=-1&' . $tt . '&orderby=date&order=DESC';
    	$myposts =  get_posts();
    	foreach($myposts as $post) {
    		$year = get_the_time('Y');
    		$title= $title= the_title('','',0);
    		$groeps[] = $year;
    	} 
    
    	$groeps = array_values(array_unique($groeps));
    	$qi = $groeps[0]; // change this number (e.g. to 1) to change the year.
    	$query = 'posts_per_page=-1&' . $tt . '&year=' . $qi .  '&category_name=Review&orderby=date&order=DESC';
    	query_posts($query);
    	while (have_posts()) :
    	the_post();
    	?><?php $myissue = get_post_meta($post->ID, issue, true); ?>
        <?php $myissue = $myissue . ' '; ?>
      <?php the_date('F Y','<h3>Issue: ' .$myissue ,'</h3>'); ?>
     <div><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></div>
    <?php endwhile; ?>

    my alterations have been adding the magazine issue number to the date and only showing certain catagory name “review”
    hope that helps someone

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Grouping and listing tags’ is closed to new replies.