WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
[resolved] Latest version doesn't work for custom post types (4 posts)

  1. Creative Slice
    Member
    Posted 1 year ago #

    We had to revert back to 3.5.6.3 to get custom fields to show up for custom post types.

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. plumwd
    Member
    Posted 1 year ago #

    I'm using v3.5.7.2. You need to make sure that you update your permalinks when you add new custom post types or they won't work correctly.

  3. IoanPokorny
    Member
    Posted 1 year ago #

    Are they defined corectly, had issues when I used plugins, if defined manually they work perfectly with all of the custom posts

    add_action( 'init', 'create_clients' );
    function create_clients() {
    	 $labels = array(
        'name' => _x('Clients', 'post type general name'),
        'singular_name' => _x('Client', 'post type singular name'),
        'add_new' => _x('Add New', 'Client'),
        'add_new_item' => __('Add new Client'),
        'edit_item' => __('Edit client'),
        'new_item' => __('New client'),
        'view_item' => __('View client'),
        'search_items' => __('Search clients'),
        'not_found' =>  __('No clients found'),
        'not_found_in_trash' => __('No clients found in Trash'),
        'parent_item_colon' => ''
      );
    
      $supports = array('title',  'page-attributes');
    
      register_post_type( 'clients',
        array(
          'labels' => $labels,
          'public' => true,
          'supports' => $supports,
          'hierarchical' => true
        )
      );
    }

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum's parser.]

  4. Creative Slice
    Member
    Posted 1 year ago #

    Thanks guys. It looks like this issue was fixed with the 3.5.7.2 update.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.