Jul 04 2008

Can Mycelium Save the World?

Justin | Category: News | 0 Comments

Since I’ve been growing food in the city I’ve been concerned about soil contamination. One answer, innovated by urban farmers in New York is to lay down a thick layer of tree mulch and build raised beds on top. This is similar to packing lots of condoms and going on a sex holiday in Africa. It might work out but doesn’t do anything for the underlying problem. As a real solution, I’ve been curious about bio-remediation of soils but haven’t delved into it in any meaningful way. Paul Stamets at the TED conference gives an incredibly optimistic and inspiring presentation about the unseen world and work of mycelium. Check it out.

Jul 04 2008

How To Get Wordpress to Link to an External URL

Justin | Category: Web | 4 Comments

This requires a little code hacking but it’s pretty simple. Open up: wp-includes/classes.php and find function: start_el

After the if else block that sets the value of the $css_class variable add the following code:


$url = get_page_link($page->ID);
$post_url = get_post_meta($page->ID, "url", true);
if ( $post_url ) {
    $url = $post_url;
}

and then remove get_page_link($page->ID) from the following line<a href="' get_page_link($page->ID) . '".... and replace it with $url: <a href="' . $url . '"

Now log in and edit the page or post you wish to specify a customized url for. Add a ‘Custom Field’ with key: ‘url‘ and a value of the full url (including http://) that you wish to send users to. The screenshot below shows the completed hack. NOTE: This will get wiped out next time you upgrade! I’ve also used the same logic to show/hide posts and pages from the menu systems.



© 2006 shibumi.net | Wordpress | dKret2 1.2 | Top