WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Verve Meta Boxes] wp 3.0 and post_types (18 posts)

  1. Anointed
    Member
    Posted 4 years ago #

    Per our email conversations, I would love to see this plugin tie directly into the post_types available in 2.9-3.0.

    This would allow us to easily assign a meta box grouping to a specific post type, so that only the 'proper' meta box is shown on the admin post page for the user to input information into.

    http://wordpress.org/extend/plugins/verve-meta-boxes/

  2. avenueverve
    Member
    Posted 4 years ago #

    Hi Shawn,

    Question, by specific post type, are you thinking of post media types? Rather than custom post types that will be available in 3.0. Thanks!

    Komra

  3. Mac_Boy
    Member
    Posted 4 years ago #

    Hello Komra,

    Both Shawn and I want your plugin to work with Custom Post Types that are available now in WP 2.9.x and will be even better in WP 3.0

    As an example, right now, Verve Meta Boxes works with the post type of 'post' and 'page'.

    An improvement would be that it would let us make new post types, such as 'sport cars'. Then I can make custom fields for 'sports cars' using Verve Meta Boxes and those custom fields would only show up for 'sports cars' and not for 'posts' or 'pages'.

    Does that make sense?

    You've got a marvelous plugin, thank you for making it!

  4. Mac_Boy
    Member
    Posted 4 years ago #

  5. avenueverve
    Member
    Posted 4 years ago #

    Are you guys programmatically creating custom post types at this time? Currently there is only one plugin for this: http://wordpress.org/extend/plugins/custom-post-type-ui/ -- but it says it is slated for the 3.0 release. I don't have time before the 3.0 launch to roll a custom post types plugin. I can understand it will be great functionality to have. Soon. Thanks for all your feedback.

  6. Anointed
    Member
    Posted 4 years ago #

    right now verve meta boxes allows you to create a group of meta values to enter on the create post/page screen.

    The problem comes into play if you create multiple verve groupings. All the groupings show up on the post/page input area.

    What I am asking is to be able to assign a verve meta group to a specific post_type when I create the verve group.

    That way if the user is going to add a post_type 'music' only the 'music' verve group of input values will be displayed on the admin when they are creating a post.

    Right now it's just a bit complicated is all. Because all of the verve boxes show up on the page, the user is able to add data to both the 'music' and the 'video' verve group. Should only be one or the other.

    It just makes it confusing for the author is all...

    Having them assigned to a post_type would solve that problem.

  7. Anointed
    Member
    Posted 4 years ago #

    Actually I am trying to combine verve with cms-press. Having the two working together would be a killer solution.

    The biggest problem I face is verve has the post types 'post/page' hardcoded in, and there is no check for post_types to assign a verve box to.

    I talked to the cms-press author a few mins ago and here is what he said:
    [blockquote]
    altering the plugin to use the registered post_types that are in 2.9 instead of hardcoding the post_types wouldn't be too hard if the plugin is setup cleanly and you're somewhat familiar with PHP. If you can get this to work with the registered post_types instead, it will automatically integrate with cms-press.
    [/blockquoute]

    I believe he may take a look into it for everyone this weekend, fingers crossed

  8. avenueverve
    Member
    Posted 4 years ago #

    Verve Meta Boxes has been updated to work with custom post types that support custom-fields. enjoy!

  9. bygraceuk
    Member
    Posted 4 years ago #

    Installed on latest build of 3.0. Upload feature doesnt seem to work. When I browse and select I have no option to upload. :(

  10. avenueverve
    Member
    Posted 4 years ago #

    Hi bygraceuk, just hit the Save Draft or Publish button. that will do it.

  11. Anointed
    Member
    Posted 4 years ago #

    Just installed verve onto 3.0beta2

    I have already created my custom post_types 'movies, actors' and they show up in my admin properly. I can manually assign meta boxes to either movies, or actors, in my theme functions file, so all is working perfectly.

    The reason I was going to use verve, is I need the image support, which wp does not handle.

    When I go into the verve admin UI, I am only given 'page, post' choices for the context.

    for some reason verve is not recognizing that I have added 'movies, actors' so that it would show up in the context field.

    How do I get it to recognize my newly created post_types, so that I can assign the context to my post_types?

    thnx

  12. Anointed
    Member
    Posted 4 years ago #

    No matter what I try, verve is not picking up my registered post_types. This means I am only presented with 2 options for context, 'pages, posts'.

    I am running 3.0-beta2-14519

    I have so far tried 2 separate routes:
    1. Using cms-press to create the post_types
    2. Using my theme's functions.php to register the post_type

    I have read through the verve code, and indeed I do see where it uses get_post_types(), but for some reason it's not returning the values to the context choices.

    Is this simply a bug with the latest 3.0 branch, or is there another way that I should be registering my post_types to get them to show up?

  13. avenueverve
    Member
    Posted 4 years ago #

    Hi anointed,

    The updated plugin looks for post types that support custom-fields. I changed this from polling the posts table to glean the custom post types available as that was more of a hack, this way is more in alignment with the wordpress way.

    To update already existing post types to include custom fields support you can run this script:

    <?php
    add_post_type_support( 'your_post_type_here', array('custom-fields') );
    ?>

    So when creating the post type one must also specify the 'supports' => array('custom-fields') argument.

    Custom Post Type UI plugin will allow you to specify the 'supports' arguments:
    http://wordpress.org/extend/plugins/custom-post-type-ui/screenshots/

    More information
    http://codex.wordpress.org/Function_Reference/register_post_type

    add_action('init', 'my_custom_init');
    function my_custom_init() {
        $args = array(
            'label' => __('Albums'),
            'singular_label' => __('Album'),
            'public' => true,
            'show_ui' => true,
            'capability_type' => 'page',
            'hierarchical' => false,
            'rewrite' => true,
            'supports' => array('title', 'thumbnail','custom-fields') /// <<< custom-fields needs to be supplied here.
            );
    
        register_post_type( 'album' , $args );
    }
  14. Anointed
    Member
    Posted 4 years ago #

    Thank you

    I already replied to the post on your blog.

    Just in case others run into this question I will double-post it here.

    The reason I was not activating custom-fields is I did not want to present something to my user that they would not need/understand.

    As we now need to activate custom-fields to use verve for post_types, how would I go about removing the custom-fields from the admin UI?

    thanks again, now it's working great.

    **I had to remove timthumb refernece as the images were not showing up in the admin. Could be because I am using 3.0 with multisite?

    Either way, I changed it to only reference the image with a width attribute as a temp fix.

  15. Anointed
    Member
    Posted 4 years ago #

    I tried the following function but it does not recognize post_type, just 'post,page,link'

    add_action('admin_menu', 'my_remove_box');
    
    function my_remove() {
    remove_meta_box('postcustom', 'post', 'normal');
    }

    Until this function remove_meta_box is changed to allow for post_types, is there an easy way for me to modify verve to not check for custom-fields?

  16. Anointed
    Member
    Posted 4 years ago #

    Is there any other solution to remove the custom fields box in my post_types as I have to activate them to use verve?

  17. Mats Mikkel Rummelhoff
    Member
    Posted 4 years ago #

    I found a working solution for hiding the custom fields box using Verve and custom post types with WP 3.0.

    Check out this thread

  18. albertpr9
    Member
    Posted 3 years ago #

    I just used jQuery to hide some elements from clients.

    $('selector').css('dispay','none');

    Change selector to the id/class of the item you need to hide.

    It's not the perfect solution, but it works, and it's extremely quick to implement.

Topic Closed

This topic has been closed to new replies.

About this Topic