Forums

Page List and Title Lists (3 posts)

  1. john_london
    Member
    Posted 2 years ago #

    Hi guys, hope you can help me - this is driving me insane.

    1) I want to list my pages (I can do this bit!) as a menu in my header. However, I want to add a period after each page, e.g.:

    Live. Music. Videos. Photos. About. Contact.

    2) I pretty much want to do the same with my post titles (apart from the first word, News, which I just want to appear at the start) - as horizontal menu which just lists each title, but with a period after each title and no content or metadata:

    News. Album launch today. T-shirt giveaways. Bulgarian tour announced.

    3) One problem that I keep having is when I use break tags in my posts it changes the width of my pages. Is this because I'm using percentages instead of pixels for my div widths?

    Thanks guys!!

  2. zeniph
    Member
    Posted 2 years ago #

    1) use the link_after argument adding a fullstop
    <?php wp_list_pages('link_after=.'); ?>

    2) Place "News" outside the loop. Then just find the relevant piece of code and put a fullstop after the link.

    <?php
       query_posts('showposts=20');
    ?>
    
    <?php if (have_posts()) : ?>
    <ul>
    	<li>News</li>
     <?php while (have_posts()) : the_post(); ?>
    	<li>
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?>.</a>
    	</li>
    <?php endwhile; ?>
    </ul>
    <?php endif; ?>

    3) no idea what you you mean

  3. john_london
    Member
    Posted 2 years ago #

    Hey - that's brilliant, thanks so much!!

Topic Closed

This topic has been closed to new replies.

About this Topic