Support » Plugin: Advanced Custom Fields » Latest version doesn't work for custom post types

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    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.]

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Latest version doesn't work for custom post types’ is closed to new replies.