• Resolved Javier

    (@xarkitu)


    I go crazy a few days trying to insert in a menu that I already have created in APF two types of post, clients and suppliers, but I can not find the way to do this. ??

    How can you create them easily as you do in your APF demo?

    APF Demo -> Manage sample post

    And to be able to create two or more post-type handlers …

    Thank you very much for your help and for this great framework.

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Javier

    (@xarkitu)

    Hi,

    I auto answered, The magic is created by the argument ‘show_in_menu’.

    class My_new_custom_post extends My_plugin_AdminPageFramework_PostType
    {
        /**
         * Use this method to set up the post type.
         * 
         * ALternatevely, you may use the set_up_{instantiated class name} method, which also is called at the end of the constructor.
         */
        public function setUp()
        {
            $this->setArguments(
                array( // argument - for the arguments, see https://codex.www.ads-software.com/Function_Reference/register_post_type#Arguments
                    'show_in_menu'  => 'My_plugin_slug_main',
                    'submenu_order_manage'  => 20,
                )
            );
        }
    }

    Happy coding and best regards.

    Plugin Author miunosoft

    (@miunosoft)

    Glad that you nailed it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Manage two or more custom post within the APF menus’ is closed to new replies.