[wp-hackers] Proposed: the_category() - improved separator
flexibilty
BoBB
rjorgy at gmail.com
Tue Oct 12 03:42:21 UTC 2004
Would it be possible to make it so th_category() accepted a second
argument like before_last and if there is more than one category it
would display that before the last one instead, i.e.
<?php the_category(', ', ' and '); ?>
would display
Category 1, Category 2, Category 3 and Category 4
On Mon, 11 Oct 2004 18:22:14 -0500, Dennis Williamson
<dennis at netstrata.com> wrote:
> For the first example, I meant "space-ampersand-space-space" (one space
> before and two after, instead of just two after).
>
> Dennis
>
>
>
> At Monday 10/11/2004 06:05 PM, you wrote:
> >Look at your "view source". In your first example, you'll see
> >ampersand-space-space. In your second, you'll see
> >nbsp-ampersand-nbsp-space. Now look at the code for the_category() in the diff:
> >
> >Original (from CVS):
> >- if (0 < $i) $thelist .= $seperator . ' ';
> >
> >Mine:
> >+ if (0 < $i) $thelist .= $seperator;
> >
> >The original concatenates a space onto every separator, no matter what you
> >pass to the function.
> >
> >Dennis
> >
> >At Monday 10/11/2004 05:18 PM, you wrote:
> >>The version of wordpress I have, 1.2.1(but also worked with 1.2) can
> >>already do that, I use the following code ...
> >>
> >><?php the_category(' & '); ?>
> >>
> >>and it works fine, always has. or in addition you could do
> >>
> >><?php the_category(' & '); ?>
> >
> >
> >
> >
> >_______________________________________________
> >hackers mailing list
> >hackers at wordpress.org
> >http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>
>
>
>
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>
--
/* BoBB
* AIM: Jodokast49 ICQ: 151495596
* Jabber: BoBB at jabber.com
* http://myeurotrip.org
*/
More information about the hackers
mailing list