Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Adam Porter
Adam Porter
12,362 Points

Creating Custom Posts Plugin

First thing I am working off of the localhost using MAMP.

Second. I am working through How to Build a WordPress Theme > Content Strategy with WordPress > Adding Custom Content to the Site

The problem: Every time I try to install the plugin "custom post types ui" I get a message that says "To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host."

This message doesn't show up in the video, so I do not know how to work through it. Why do I need FTP information if I am working locally?

I want to work through this because I want to work quicker (locally). I do not want to do all my work at a slower pace (live, online).

Any comments on how to work through this would be greatly appreciated, thank you!

Shivam Bhalla
Shivam Bhalla
Courses Plus Student 5,035 Points

You don't need to use a plugin to create a custom post type, you can create it your self.

Paste this in your themes functions.php file (copied from WordPress):

add_action( 'init', 'create_post_type' );

function create_post_type() {
    register_post_type( 'acme_product',
    array(
                'labels' => array(
        'name' => __( 'Products' ), /* Change to what ever name you like */
        'singular_name' => __( 'Product' )
    ) ,
    'public' => true,
     'has_archive' => true,
    )
);
}

Check out the WP codex for more reference: http://codex.wordpress.org/Post_Types

Did you try to download the plugin (and do a manual install) or choose to Upload (instead of telling the dashboard that you want to search for it from the directory)?

See: http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation

1 Answer

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Posting here just so there are not '0' answers marked