★ ERIC Atkins ★

ERIC Atkins / deV // sandboX
Vitality / On the go // Nothing
from ~~ Huntsville, Alabama

Eric Atkins at Sutro Tower in San Francisco, California

℮ⁿgr & ₮ech№phile.●●●●
eaRTH sui┼ ῡs3r.████
℮arly ɑd○pter▐▐▐▐

★ iPhone photography ★

•• εriç αtk¡ñ§.com || since 1999 ••
• tumbln since 2007 •

Search

Find me on...

Drupal: changing from one node type to another

On this website I had nodes that were “story” node types and “blog” node types. It was getting confusing. So I moved all “blog” nodes to “story” nodes by creating a page and running the following PHP code from a Drupal node:

node_type_update_nodes('blog', 'story');
?>


Steps:

1. Create a new page: node/add/page.
2. Insert code above. “blog” nodes will be changed to “story” nodes.
3. Set “PHP code” as the “Input format”.
4. Preview the page.
5. All blog posts should now be converted to story posts.

Quick and easy.

Loading posts...