• Resolved biscuitier0

    (@itsaskew)


    Hi

    I have created two custom post types suing Custom Post Type UI plugin (I had made these prior to discovering that your plugin has CPT capability). I would like to get these two post types sharing an archive template with the difference that each archive page is colour coded.

    I was hoping that your “archive options page” might be the answer if I could add a colour picker field. However, I just cannot get the archive options location working and wondered if there is something I need to do to get my CPT UI created post types and your plugin to be compatible? Both post types have archive enabled.

    Very grateful for any help you can give with any aspect of the issue

Viewing 1 replies (of 1 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    You can add ACF Extended specific settings to existing post types (outside of the ACF Extended Post Types module) using the register_post_type_args hook (See documentation).

    This hook will let you customize any post type argument. You’ll find a usage example in the ACF Extended documentation here.

    Here is a usage example to add the Post Type Archive feature to an existing post type:

    add_filter('register_post_type_args', 'my_post_type_args', 10, 2);
    function my_post_type_args($args, $post_type){
        
        // target "my-post-type"
        if($post_type === 'my-post-type'){
        
            // enable post type archive
            $args['acfe_admin_archive'] = true;
        
        }
        // return
        return $args;
        
    }

    Hope it helps!

    Have a nice day!

    Regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Difficulty getting archive options to display’ is closed to new replies.