I'm using different post types or categories to determine where to put specific posts on my index.php page for example.
I'd love to add a new entry to my admin menu (like "slider") without using plugins, but only a theme.
I found this in the wordpress documentation which seems to be for plugins - am I right?
If I cannot create an object I'd be interested if it is possible to create an entry in the admin menu which forces a specfific post type or category (hidden).
The following code will add an entry to my "settings / einstellungen" menu tab. However I'd like to position it somewhere else
add_action( 'admin_menu', 'my_plugin_menu' );
function my_plugin_menu() {
add_options_page( 'Slider', 'Create Slider', 'manage_options', 'create-a-slider', 'my_plugin_options' );
}
function my_plugin_options() {
if ( !current_user_can( 'manage_options' ) ) {
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
}
echo '<div class="wrap">';
echo '<p>Here is where the form would go if I actually had options.</p>';
echo '</div>';
}
add_menu_page()
– Dr.Molle