[wp-testers] Custom Post Type with Meta Box - Permalink and Presentation Problems

Deanna Schneider deanna.schneider at gmail.com
Wed Apr 28 17:09:46 UTC 2010


Glad you got it working. :)

On Wed, Apr 28, 2010 at 11:34 AM, Jamie Oastler <jamie.oastler at gmail.com> wrote:
> Solved. Working solution for reference:
> http://wordpress.pastebin.com/98WywUCZ
>
> On Tue, Apr 27, 2010 at 10:09 PM, Jamie Oastler <jamie.oastler at gmail.com> wrote:
>> Deanna gave an excellent example for #1 with a template_redirect action.
>>
>> For the second item, I have tried the following code which *should*
>> work on two different servers and both result in a blank page display
>> of the admin. Adding rewrite => false will have the post type menu,
>> but not any permalinks.
>>
>> // Register custom post type - Manager
>> register_post_type('manager', array(
>>        'label' => __('Managers'),
>>        'singular_label' => __('Manager'),
>>        'public' => true,
>>        'show_ui' => true, // UI in admin panel
>>        'capability_type' => 'post',
>>        'hierarchical' => false,
>>        'query_var' => "manager", // This goes to the WP_Query schema
>>        'supports' => array('title' ,'thumbnail' /*'excerpt', 'editor'
>> ,'custom-fields'*/)
>> ));
>>
>> Also at http://wordpress.pastebin.com/3dZJZnJw
>>
>>
>> On Tue, Apr 27, 2010 at 7:00 PM, Jamie Oastler <jamie.oastler at gmail.com> wrote:
>>> Using the nightly beta build I have managed to make a great custom
>>> post type following the instructions on
>>> http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html
>>>
>>> But now I am struggling with the presentation side of the big changes
>>> for WP 3.0. If someone could please share some generic examples for
>>> how to achieve the following it would be greatly appreciated. I've
>>> hunted through most of google and had no success.
>>>
>>> 1) How to create the equivelent of a category-#.php based file for
>>> custom post types and single.php for posts within.
>>>
>>> 2) How to have the permalink structure be the equivelent of
>>> http://site.com/custom-data-type/post-slug
>>> Anything I did to the rewrite parameter in register_post_type would
>>> usually cause the admin console and site to not render.
>>> Right now I get "http://site.com/?album=album-title
>>>
>>> Thanks,
>>> Jamie
>>>
>>
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>


More information about the wp-testers mailing list