The document provides tips and tricks for importing content into WordPress from other systems such as Blogger, Joomla, and Drupal as well as exporting content from WordPress. It discusses preparation steps, plugins that can assist with imports, and uncommon imports from sources like Twitter, Delicious, and HTML files. The document also covers things to check after importing like search and replace and adding linked images to galleries.
11. Preparation
• Back up
• Prepare to undo
• Import on development server
• Or turn on maintenance mode
• Turn off crossposting plugins
• Use absolute URLs for linked files
12. Plugins
• DB Backup
http://wordpress.org/extend/plugins/wp-db-backup/
• Mass Page Remover
http://wordpress.org/extend/plugins/mass-page-remover/
• WordPress Reset
http://wordpress.org/extend/plugins/wordpress-reset/
• Maintenance Mode
http://wordpress.org/extend/plugins/maintenance-mode/
13. WordPress export
• Posts, pages, comments, authors
• Uploads optional
• No settings
• No menus in 3.0 (fixed in 3.1)
• Category slug issues (fixed in 3.1)
• Skips users with no posts
40. List Child Pages
function append_child_pages( $content ) {
$children = '';
if ( is_page() && (empty( $content )) ) {
global $post;
$children = '<ul class="childpages">'
.wp_list_pages('echo=0&title_li=&child_of='.$post->ID)
.'</ul>';
}
return $content.$children;
}
add_filter( 'the_content' , 'append_child_pages' );
http://sillybean.net/?p=5246
41. User Contact Info
function change_contactmethod( $contactmethods ) {
// Add some fields
$contactmethods['twitter'] = 'Twitter Name (no @)';
$contactmethods['phone'] = 'Phone Number';
$contactmethods['title'] = 'Title';
// Remove AIM, Yahoo IM, Google Talk/Jabber
unset($contactmethods['aim']);
unset($contactmethods['yim']);
unset($contactmethods['jabber']);
// make it go!
return $contactmethods;
}
add_filter('user_contactmethods','change_contactmethod',10,1);
http://sillybean.net/?p=2714
If you&#x2019;ve been using WordPress for a while, you might not have noticed the screen options that were added a few versions ago. You can change the number of posts or pages shown per page in the Edit screens, and you can hide some of the columns if you like.\n
On the menu screen, the screen options allows you to show things that are normally hidden, like custom post types and taxonomies.\n
On the Dashboard, the screen options let you choose the number of columns your widgets are displayed in, and you can turn off individual widgets.\n
\n
The bulk edit feature is also easy to overlook. Check off several posts in the Edit screen, then choose &#x201C;Edit&#x201D; from the Bulk Actions dropdown. You&#x2019;ll be able to edit all the attributes of the posts: categories, tags, comment/trackback settings, publication status, and sticky status. You won&#x2019;t be able to edit things that are naturally unique to each post, like the title and date.\n
\n
Did you know there&#x2019;s a members-only content feature built right into WordPress? It&#x2019;s a little buggy, which is probably why it&#x2019;s not more well-known. If you change a post or page to privately published, only logged-in users who can see private posts and pages will be able to see it.\n
This is Justin Tadlock&#x2019;s Members plugin. Among other things, you can choose which roles can edit or read private posts and pages -- or you can create a whole new role for that purpose.\n
the_shortlink() is a new function in 3.0. It lets you print a shorter permalink for your post in your template file for readers to use. If you have the WordPress Stats plugin installed, you&#x2019;ll see wp.me links (although you can turn that off in the plugin&#x2019;s settings). If not, you&#x2019;ll see the default permalink structure (example.com/?p=123), which always works no matter what permalink structure you&#x2019;ve chosen.\n
\n
\n
\n
The Incoming Links and the two WordPress news Dashboard widgets are just RSS readers. Click &#x201C;configure&#x201D; in the upper right corner of each widget, and you&#x2019;ll be able to change the RSS feed that&#x2019;s shown.\n
\n
Type options.php into your address bar (example.com/wp-admin/options.php) and you&#x2019;ll get this alphabetized listing of all the options stored in your wp_options database table. Some won&#x2019;t be editable -- if they&#x2019;re stored as arrays, you&#x2019;ll just see &#x201C;Serialized data&#x201D; -- but the rest can be changed here. Be careful with this!\n
You can edit serialized options by changing the database fields directly. Copy the serialized array (shown here in the row with the ID 10390) and paste it into the Online PHP Unserializer at blog.tanist.co.uk. This tool will convert the serialized array to a more familiar array printout. You can then make changes and re-serialize the array to store it back in the database.\n
\n
WordPress automatically generates feeds for just about everything. Most of the time, the feeds for posts and comments are the only ones you see. For anything else, just add /feed to the URL and see what happens! You can get feeds for categories, tags, combinations of tags...\n
... individual authors&#x2019; posts, post types (including pages!), taxonomy terms, and even search terms.\n
This is where you&#x2019;ll have to get your hands dirty with code. Filters allow you to change the way content is handled or displayed in WordPress sites.\n
For example, you can easily allow users to use shortcodes in text widgets by adding these two lines to your functions.php file.\n
It&#x2019;s also easy to automatically list child pages on a parent page with empty content using this filter. (See my website for alternatives using shortcodes and template tags.)\n
This filter alters the contact fields that are shown in user profiles. Here, I&#x2019;ve removed the three IM fields and added Twitter, a phone number, and a job title.\n
Here&#x2019;s how the new contact fields appear.\n
With the new fields in place, it&#x2019;s easy to build a robust user directory. (See this URL for details on limiting the directory to certain roles.)\n
This is where you&#x2019;ll have to get your hands dirty with code. Filters allow you to change the way content is handled or displayed in WordPress sites.\n
\n
Use the Exploit Scanner plugin after you&#x2019;ve installed, but before you&#x2019;ve enabled, a new theme or plugin. This was written by several of the core developers and it looks for a lot of the problems they see in things rejected from the official repositories.\n