WPATX Meet-Up Notes — October 4, 2011 — Hosted by CoSpace
Last month’s Blogging discussion triggered so many member questions and comments that Clark Wimberly graciously set up October’s WPATX Meet-up as a Quck-Time Q&A
Using a staging server to deploy changes
Presented by Chris Lazan and Mark Kelnar of WP Engine
The WP Engine Team demonstrated their staging system which allows you to upload plugins and themes and test them before making the changes live.
If you’re not using the WP Engine hosting, the best plan is to use phpMyAdmin to backup your site, work on the site on a localhost, and then upload it to the live site.
Bill Erickson has a great post on his site that details out the process to move a site from a local/development server to the live site. (Of course using ‘Bill Erickson and great post in the same sentence is a bit redundant 😉
What is a custom post type?
Presented by Clark Wimberly
What is a post?
- Posts – blog posts, which are the chronologically-based posts
- Pages hierarchical organization
- Attachments, Revisions and Nav menus are also posts
Custom post types can add new content by allowing you to add additional types of posts.
When you register a new custom post type, it is separate from normal loops/queries. They won’t show in RSS or widgets unless you want them to.
Register a new custom post type in functions.php. You need to define just a few options but that’s it. The new post type will show up in your WP-admin immediately.
See Clark’s presentation for an explanation of how to create a custom post type. Justin Tadlock also offers a tutorial on how to set up a custom post type.
Themergency has a code generator for custom post types.
More info on custom post types at WP Beginner.
Keeping your HTML safe from the editor
Presented by Pat Ramsey
The problem: if you put HTML in your page/post, it can get corrupted if someone goes in to edit that page later. If you create a shortcode, you can place a marker in the page to some HTML that resides in your functions file rather than in your HTML code in the editor.
Shortcodes are text in [brackets].
Pat showed code for your functions.php file to create different shortcodes.
This is particularly useful for adding HTML to widgets. You can pop in a shortcode into a text widget rather than HTML code. You will have to enable this in your functions file.
You can read more about shortcodes on Bill Erickson’s site as well as the WordPress codex.
WordPress beyond blogging
Presented by Jo Carrington
Using WordPress as a content management system: allows us to define any arbitrary amount of content like posts and pages. Can use custom post types to create new content areas.
How to create custom post types with plugins.
Let’s pretend we have a bookstore website. We would need:
- Books: Title, Publisher, Author, ISBN, Price (each of these is a field)
- Staff: Name, Photo, Bio, Twitter
- Events: Name, Time, Description
Two plugins suggestions:
Create the new custom post type with More Types. Then you can add additional fields with More Fields. You will need to edit your template file (php file) with a WordPress hook to get this information and display it. Go to the WordPress Codex for the get post meta code to add the code into your site.
What is the Loop?
presented by Nick Batik
The WordPress loop basically does this:
if there are posts
while (there are posts)
An example of the loop in the WordPress Codex – see the section “the World’s Simplest Index Page” for a simple example of the loop in action.
The loop is the core of every single page displayed on your website. Every page/post on your site will run the loop, even if there’s just one post.
Look at the template files for the default WordPress theme Twenty Eleven for different examples of the loop.
One suggestion from the group: the premium plugin Loop Buddy allows to modify the loop without getting into the code.
Want More Quick Q&A?
If you haven’t already given your input, follow this link and look at the questions members have asked regarding WordPress:
(Big thanks to Clark for setting up the Google Moderator page)
If you see a question you like, click on the checkmark. If you have a question that’s not listed, feel free to add it to the list. We’ll select the five with the most votes and answer those during a future meet-ups.
See Clark Wimberly’s notes at clarklab.net.
Look for the video online soon at Austin Tech Videos.
Leave a Reply