Support » Plugin: Nooz » Homepage news list

  • Resolved angelacrystal

    (@angelacrystal)



    I want to feature links to the latest news releases in the footer of my site. I’ve done this before with regular posts (see code below), but I’m wondering if you could help me do this with nooz posts?

    Thanks!
    Angela

    <?php query_posts('showposts=1&post_type=post'); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
      		<ul>
      			<li>
      			<h5><a href="<?php the_permalink() ?>"><?php the_time('F Y'); ?></a></h5>
    			<p><?php the_title(); ?></p>
    			</li>
    		</ul>
    <?php endwhile; else : ?>
    <?php endif; ?>	
    
    <?php rewind_posts(); ?>
    <?php query_posts('showposts=1&offset=1&post_type=post'); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    	  		<ul>
    	  			<li>
    	  			<h5><a href="<?php the_permalink() ?>"><?php the_time('F Y'); ?></a></h5>
    				<p><?php the_title(); ?></p>
    				</li>
    			</ul>
    <?php endwhile; else : ?>
    <?php endif; ?>

    https://wordpress.org/plugins/nooz/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor farinspace

    (@farinspace)

    The two post types used by Nooz currently are:”nooz_release” and “nooz_coverage”, you should be able to swap out “post” for a nooz post type.

    Brilliant! Thanks, Brother. Works perfectly. 🙂

    Also, for anyone wanting to do this in the future, here’s some code (without my styling) to do multiple post pulls. Just change the ‘showposts=3’ to however many posts you’d like to pull.

    <?php query_posts('showposts=3&post_type=nooz_release'); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    		<?php the_time('F Y'); ?>
    		<?php the_title(); ?>
    		<?php the_excerpt(); ?>
    		<a>">Link to Full Post</a>
    <?php endwhile; else : ?>
    <?php endif; ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Homepage news list’ is closed to new replies.