• Resolved AvWijk

    (@avwijk)


    Hello all,

    I’m setting up a membership database with Advanced Custom Field and Custom Post Type(s). So far so good, only the overview isn’t showing properly since I left basically every native WordPress field out, including the title.

    The input ‘new post’ field shows correctly though, with fields as lastname,firstname,phone,email etc.

    The edit screen however shows only this (I have two entries so far).

    [IMG]https://i59.tinypic.com/11cci9l.png[/IMG] (link: https://i59.tinypic.com/11cci9l.png)

    Is it something I simply overlooked? My custom post code is as follows. Shouldn’t these ACF values be somewhere in here?

    <?php
    // register leden custom post type
    add_action( 'init', 'register_cpt_lid' );
    
    function register_cpt_lid() {
    
        $labels = array(
            'name' => _x( 'Leden', 'lid' ),
            'singular_name' => _x( 'Lid', 'lid' ),
            'add_new' => _x( 'Nieuw lid', 'lid' ),
            'add_new_item' => _x( 'Nieuw lid', 'lid' ),
            'edit_item' => _x( 'Bewerken', 'lid' ),
            'new_item' => _x( 'Nieuwe Lid', 'lid' ),
            'view_item' => _x( 'Bekijk Lid', 'lid' ),
            'search_items' => _x( 'Zoek naar leden', 'lid' ),
            'not_found' => _x( 'Geen leden gevonden', 'lid' ),
            'not_found_in_trash' => _x( 'Geen leden gevonden in prullenbak', 'lid' ),
            'parent_item_colon' => _x( 'Parent Lid:', 'lid' ),
            'menu_name' => _x( 'Ledenbestand', 'lid' ),
        );
    
        $args = array(
            'labels' => $labels,
            'hierarchical' => false,
            'description' => 'Alle Leden',
            'supports' => array('custom-fields','thumbnail'),
            'taxonomies' => array( 'category', 'post_tag' ),
            'public' => true,
            'show_ui' => true,
            'show_in_menu' => true,
    		'menu_icon' => get_stylesheet_directory_uri() . '/images/leden.gif',
            'menu_position' => 5,
    
            'show_in_nav_menus' => true,
            'publicly_queryable' => true,
            'exclude_from_search' => true,
            'has_archive' => false,
            'query_var' => true,
            'can_export' => true,
            'rewrite' => true,
            'capability_type' => 'post'
        );
    
        register_post_type( 'lid', $args );
    }
    ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Advanced Custom Fields] not showing in edit post field’ is closed to new replies.