Chronosbox

Wordpress

WP-Syntax colors problem

by Felipe 'chronos' Prenholato on 11:24 PM, under Plugins, Wordpress

WP-Syntax are plugin that highlight code snippets on all my posts. My big friend Handrus notified me that after upgrade to WP 2.8.1 colors was wrong, so I adjusted some colors but not at all.

WP-Syntax uses Geshi, and configuration of colors with WP-Syntax-Colorizer are really a headcache, now my plan is get WP-Syntax and develop plugin to use more geshi capabilities :) .

This is my first work on a WP plugin and if you have some sugestion please comment!

Thx

3 Comments :, , more...

Wordpress template page for categorized posts.

by Felipe 'chronos' Prenholato on 02:11 AM, under Snippets, Wordpress

Fast code snippet to get one page template that show posts of one category:

Add in your template page following code:

<?
the_post();
$keys = get_post_custom_keys();
if(in_array("category",$keys)) {
	$categoryslug = get_post_custom_values("category");
	query_posts('category_name='.$categoryslug[0]);
}
?>

Now, in your page add a custom field named ‘category’, field value is slug name of category.

Save the page and be happy! Now you can use same template for various pages and show any category without change more PHP code :) .

6 Comments :, , , , more...

StatPress

Visits today: 28 Visits since 6 de April de 2009: 16055 Visitors now: %visitoronline%