The admin-init
hook only fires on admin screens. The correct hook to use for registering post types is init
.
So change:
add_action( 'admin_init', 'smoelenboek' );
… to …
add_action( 'init', 'smoelenboek' );
… and flush your rewrite rules once (save permalink settings in admin) and all should be well.
Related Posts:
- Custom post type single-{custom}.php not working
- Make Next and Previous on single-$posttype.php use the same order as archive-$posttype.php
- WordPress giving me the index
- Loop all post on single.php
- Where to put my code: plugin or functions.php?
- How to disable the single view for a custom post type?
- How to display value of custom fields in page
- Custom post type single page returns 404 error
- Custom post type – order field
- What is singular.php?
- Conditional for single-{post-type}.php
- Change permalinks for posts but not for custom post types
- Mini-Site Strategy
- Assign single template to multiple custom post types?
- Custom Post Type Permalink Page Not Found
- Template for specific post of custom post type
- How to build a complex page structure
- How to put custom post types on front page
- Single custom post type page redirecting to 404 page
- How to set a fall back template for a custom post type in a plugin?
- How to add multiple images to a custom post type single post?
- Pre get posts for single post
- Pull Two Posts Into Custom Post Type `single-cpt.php`
- How can I fix those issues generated by the Themecheck plugin
- Why is get_post_format() for “Standard” returns empty
- is_singular() not working if called via callback function of admin-ajax.php
- Is it proper to create a page just to generate a listing page (eg. for a custom post type)
- Disable Single Post View for Specific Taxonomy on Custom Post Type
- Custom Post Type Archive URL takes over page URL
- Where to put archive-{post-type}.php
- Password-protect a custom rss feed
- How to set a custom post type post as static front page?
- Rename a current used post type
- How to get a list of term names of the custom post type im currently on in single.php
- is_singular won’t call my functions?
- Create sub single pages
- Using previous_post_link and next_post_link to wrap around post sequence
- Template tags to display custom post type posts in category template?
- Custom Search form not working in localhost
- How do I create new content pages for my Custom Post Type?
- Group search results by post type, but hide post types with no results
- single-type.php not working, delivering 404
- Managing event dates vs published dates in admin custom post type
- Display “Post 2 of 4” on single post page?
- posts_nav_link on single post template
- Post Rank on Single Post page based on custom field
- Disable single pages and archives and keep preview
- Custom post type archive sorted and grouped by date in post meta field
- Displaying Meta Box Image
- Multiple Content Block
- Message on Custom Posts Type admin page
- Custom template for post type not working
- Make custom post type display as a page
- Assigning Multiple Layout Designs with Custom Pages in WordPress?
- How to retrieve custom field types for all posts in WordPress/PHP?
- adding .current* tags to custom post types and taxonomies
- Integrating Orbit slider into wordpress through custom post type
- How do I create an archive page for standard posts?
- Is it possible to associate different kinds of custom post types one to the other?
- Limit users by custom taxonomy and user roles
- Disable single view in register_post_type [duplicate]
- Remove parent from custom post type
- Page as a child of a Custom Post Type
- Archive page for custom post type not working
- Redirect Single Post CPT (Custom Post Type) to a specific URL
- Need post_type_archive_title function but in ‘single’
- Generate Shortcodes by Taxonomy
- need advice on how to do a lists using custom post types – taxonomy vs postmeta
- Why is archive.php used for my page
- How to add extra input fields to CPT’s comment form?
- pagination redirecting from page number url before page requested
- How to check the terms in single custom post type template
- ACF simple text field value not showing
- How to show the archive / post type description on Single templates
- Need to display same custom post type on 2 different singles templates
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- Is it possible to place custom post type files inside a folder in theme directory?
- Posts of custom post type load the page template
- How to call custom single post?
- Displaying a custom post types custom taxonomy value?
- Custom post template for particular posts
- Should I use custom menu, C.P.T. or theme options, or something else for this?
- Remove single page for custom post type
- Single Template that can be applied only via URL
- What’s the difference between same wp functions get_posts(); functions in different form?
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- How do I display tags for a custom post type single page?
- What template files do I need to customise custom-category-term-links rather than fall back on archive.php?
- Get term name and term parent into custom post type permalink
- Custom post type not displaying content from single-{custom post type} page
- Allow non-logged in users to see a future post after clicking on a list of future posts
- custom post type parsed as attachment
- Help need making decision. Ads rotating site on wordpress
- Query & Order posts by custom fields
- custom taxonamy and post type
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Return the latest post from a custom Taxonomy and Post Type
- Don’t know how to show custom taxonomies from a custom post_type
- Single template showing all posts of that type
- Not Able to Get Custom Post Type Gallery Images URL