[wp-forums] Posts, code & codebins

Podz podz at tamba2.org.uk
Thu Aug 25 23:03:46 GMT 2005


Jalenack wrote:
> How about having our own WP pastebin? paste.wordpress.org 
> <http://paste.wordpress.org> ? Then we wouldn't have to worry about 
> losing the data.

Top idea.
I agree with TG about people pasting tons of code (especially rewrite 
rules which so very few people understand) and a link would certainly be 
worth trying for that reason alone.
But......

What Codex lacks is a lot of realworld examples. One code example for 
using 'is_category' might be good, but 10 different ways of realworld is 
more than 10 times better isn't it ?

Let's say someone says "How can I have different header images per 
category ?"
I paste this into the wp-pastebin:
<h1 id="header"
class="<?php if(is_home()) echo('header1');
elseif(is_category('Beans') ) echo('header2');
elseif(is_category('Carrots') ) echo('header3');
elseif(is_category('Chocolate') ) echo('header4');
elseif(is_single()) echo('header5');
elseif(is_page())echo('header6'); ?>">
They try it, and come back with some questions specific to their needs.
The code could be updated (we could use a new [code] tag) and again 
tried. The pastebin could be used for small notes. Then when that issue 
is solved with the Op saying "Yes!" we have a piece of code that we can 
transfer to Codex along with precisely how it is being used.
We all win.

The pastebin itself has the problems that all such devices have with 
regard to abuse, but what say you about the idea in principle ?

P.


More information about the wp-forums mailing list