• Resolved lxg

    (@mastermind)


    I love the new feature of the 3.0 series that you can easily define own post types. However, I need to make my post type (and its dedicated taxonomy) the primary one.

    This means:

    • My post type be “video”
    • Its taxonomies be “videocat” and “videotag”
    • I want the permalink structure to be %category%/%post_name% (yes, I know of the performance issues)
    • The /video/ part should not be visible in the URL, instead, there should be the according category.
    • Posts should behave like an custom post type in regard to URL structure.

    In regard to permalinks, the solutions posted in https://www.ads-software.com/support/topic/custom-post-type-permalink-rewrite did unfortunately not work for me. (Yes, I did flush the rewrite rules.)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter lxg

    (@mastermind)

    I found a solution for the Permalink issue: I have set '_builtin'=>true in the register_post_type() call.

    I know it’s marked as internal feature and not recommended for plugin developers, but this exactly the feature that solved my problem.

    All other problems are all solved, too.

    How did you solve the post-type issue? I would like to set a custom post type as the default one as well.

    Please help, thanks!

    @electricman: you can remove menu items with the remove_menu_page() function (since 3.1).

    Where would I put that code?

    To remove the Posts menu item from the admin sidebar, put this in your functions.php:

    add_action( 'admin_init', 'my_remove_menu_pages' );
    function my_remove_menu_pages() {
    	remove_menu_page('edit.php');
    }

    Note that this function simply removes the menu item, the posts admin page will still be accessible for logged in users who know the url, e.g. https://mysite.com/wp-admin/edit.php.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Make custom post type primary post type’ is closed to new replies.