|
@@ -344,17 +344,111 @@ function projekte() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+add_action('init', 'baugruppen', 0);
|
|
|
|
|
+function baugruppen() {
|
|
|
|
|
+ $labels = array(
|
|
|
|
|
+ 'name' => _x('Baugruppen', 'Post Type General Name', 'theme'),
|
|
|
|
|
+ 'singular_name' => _x('Baugruppe', 'Post Type Singular Name', 'theme'),
|
|
|
|
|
+ 'menu_name' => __('Baugruppen', 'theme'),
|
|
|
|
|
+ 'name_admin_bar' => __('Baugruppen', 'theme'),
|
|
|
|
|
+ 'parent_item_colon' => __('Parent Baugruppen:', 'theme'),
|
|
|
|
|
+ 'all_items' => __('All Baugruppen', 'theme'),
|
|
|
|
|
+ 'add_new_item' => __('Add New group', 'theme'),
|
|
|
|
|
+ 'add_new' => __('Add New', 'theme'),
|
|
|
|
|
+ 'new_item' => __('New group', 'theme'),
|
|
|
|
|
+ 'edit_item' => __('Edit group', 'theme'),
|
|
|
|
|
+ 'update_item' => __('Update group', 'theme'),
|
|
|
|
|
+ 'view_item' => __('View groups', 'theme'),
|
|
|
|
|
+ 'search_items' => __('Search groups', 'theme'),
|
|
|
|
|
+ 'not_found' => __('Not found', 'theme'),
|
|
|
|
|
+ 'not_found_in_trash' => __('Not found in Trash', 'theme'),
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ $args = array(
|
|
|
|
|
+ 'label' => __('baugruppen', 'theme'),
|
|
|
|
|
+ 'labels' => $labels,
|
|
|
|
|
+ 'description' => __('Team', 'theme'),
|
|
|
|
|
+ 'supports' => array('title', 'thumbnail'),
|
|
|
|
|
+ //'taxonomies' => array('category', 'post_tag'),
|
|
|
|
|
+ 'hierarchical' => false,
|
|
|
|
|
+ 'public' => true,
|
|
|
|
|
+ 'show_ui' => true,
|
|
|
|
|
+ 'show_in_menu' => true,
|
|
|
|
|
+ 'menu_position' => 5,
|
|
|
|
|
+ 'show_in_admin_bar' => true,
|
|
|
|
|
+ 'show_in_nav_menus' => true,
|
|
|
|
|
+ 'can_export' => true,
|
|
|
|
|
+ 'has_archive' => true,
|
|
|
|
|
+ 'exclude_from_search' => false,
|
|
|
|
|
+ 'publicly_queryable' => true,
|
|
|
|
|
+ 'capability_type' => 'page',
|
|
|
|
|
+ 'menu_icon' => 'dashicons-store',
|
|
|
|
|
+ );
|
|
|
|
|
+ register_post_type( 'baugruppen', $args );
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+add_action('init', 'clients', 0);
|
|
|
|
|
+function clients() {
|
|
|
|
|
+ $labels = array(
|
|
|
|
|
+ 'name' => _x('Clients', 'Post Type General Name', 'theme'),
|
|
|
|
|
+ 'singular_name' => _x('Client', 'Post Type Singular Name', 'theme'),
|
|
|
|
|
+ 'menu_name' => __('Clients', 'theme'),
|
|
|
|
|
+ 'name_admin_bar' => __('Clients', 'theme'),
|
|
|
|
|
+ 'parent_item_colon' => __('Parent Clients:', 'theme'),
|
|
|
|
|
+ 'all_items' => __('All Clients', 'theme'),
|
|
|
|
|
+ 'add_new_item' => __('Add New client', 'theme'),
|
|
|
|
|
+ 'add_new' => __('Add New', 'theme'),
|
|
|
|
|
+ 'new_item' => __('New client', 'theme'),
|
|
|
|
|
+ 'edit_item' => __('Edit client', 'theme'),
|
|
|
|
|
+ 'update_item' => __('Update client', 'theme'),
|
|
|
|
|
+ 'view_item' => __('View clients', 'theme'),
|
|
|
|
|
+ 'search_items' => __('Search clients', 'theme'),
|
|
|
|
|
+ 'not_found' => __('Not found', 'theme'),
|
|
|
|
|
+ 'not_found_in_trash' => __('Not found in Trash', 'theme'),
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ $args = array(
|
|
|
|
|
+ 'label' => __('clients', 'theme'),
|
|
|
|
|
+ 'labels' => $labels,
|
|
|
|
|
+ 'description' => __('Team', 'theme'),
|
|
|
|
|
+ 'supports' => array('title', 'thumbnail'),
|
|
|
|
|
+ //'taxonomies' => array('category', 'post_tag'),
|
|
|
|
|
+ 'hierarchical' => false,
|
|
|
|
|
+ 'public' => true,
|
|
|
|
|
+ 'show_ui' => true,
|
|
|
|
|
+ 'show_in_menu' => true,
|
|
|
|
|
+ 'menu_position' => 5,
|
|
|
|
|
+ 'show_in_admin_bar' => true,
|
|
|
|
|
+ 'show_in_nav_menus' => true,
|
|
|
|
|
+ 'can_export' => true,
|
|
|
|
|
+ 'has_archive' => true,
|
|
|
|
|
+ 'exclude_from_search' => false,
|
|
|
|
|
+ 'publicly_queryable' => true,
|
|
|
|
|
+ 'capability_type' => 'page',
|
|
|
|
|
+ 'menu_icon' => 'dashicons-store',
|
|
|
|
|
+ );
|
|
|
|
|
+ register_post_type( 'clients', $args );
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
add_action("admin_init", "admin_init");
|
|
add_action("admin_init", "admin_init");
|
|
|
|
|
|
|
|
function admin_init(){
|
|
function admin_init(){
|
|
|
// mitarbetier
|
|
// mitarbetier
|
|
|
- add_meta_box("mitarbeiter-position", "Position", "mitarbeiter_position", "mitarbeiter", "normal", "low");
|
|
|
|
|
- add_meta_box("mitarbeiter-email", "Email", "mitarbeiter_email", "mitarbeiter", "normal", "low");
|
|
|
|
|
|
|
+ add_meta_box("mitarbeiter-position", "Position", "mitarbeiter_position", "mitarbeiter", "normal", "low");
|
|
|
|
|
+ add_meta_box("mitarbeiter-email", "Email", "mitarbeiter_email", "mitarbeiter", "normal", "low");
|
|
|
// Projekte
|
|
// Projekte
|
|
|
- add_meta_box("projekt-beschreibung", "Description", "projekt_beschreibung", "projekte", "normal", "low");
|
|
|
|
|
- add_meta_box("projekt-link", "Link", "projekt_link", "projekte", "normal", "low");
|
|
|
|
|
|
|
+ add_meta_box("projekt-beschreibung", "Description", "projekt_beschreibung", "projekte", "normal", "low");
|
|
|
|
|
+ add_meta_box("projekt-link", "Link", "projekt_link", "projekte", "normal", "low");
|
|
|
|
|
+ // Baugruppen
|
|
|
|
|
+ add_meta_box("baugruppe-link", "Link", "baugruppe_link", "baugruppen", "normal", "low");
|
|
|
|
|
+ // Baugruppen
|
|
|
|
|
+ add_meta_box("client-link", "Link", "client_link", "clients", "normal", "low");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
function mitarbeiter_email(){
|
|
function mitarbeiter_email(){
|
|
|
global $post;
|
|
global $post;
|
|
|
$custom = get_post_custom($post->ID);
|
|
$custom = get_post_custom($post->ID);
|
|
@@ -395,6 +489,26 @@ function projekt_link(){
|
|
|
<?php
|
|
<?php
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function baugruppe_link(){
|
|
|
|
|
+ global $post;
|
|
|
|
|
+ $custom = get_post_custom($post->ID);
|
|
|
|
|
+ $baugruppe_link = $custom["baugruppe_link"][0];
|
|
|
|
|
+ ?>
|
|
|
|
|
+ <label>Link:</label>
|
|
|
|
|
+ <input name="baugruppe_link" value="<?php echo $baugruppe_link; ?>" />
|
|
|
|
|
+ <?php
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+function client_link(){
|
|
|
|
|
+ global $post;
|
|
|
|
|
+ $custom = get_post_custom($post->ID);
|
|
|
|
|
+ $client_link = $custom["client_link"][0];
|
|
|
|
|
+ ?>
|
|
|
|
|
+ <label>Link:</label>
|
|
|
|
|
+ <input name="client_link" value="<?php echo $client_link; ?>" />
|
|
|
|
|
+ <?php
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
add_action('save_post', 'save_details');
|
|
add_action('save_post', 'save_details');
|
|
|
|
|
|
|
@@ -406,15 +520,20 @@ function save_details(){
|
|
|
// Projekte
|
|
// Projekte
|
|
|
update_post_meta($post->ID, "projekt_beschreibung", $_POST["projekt_beschreibung"]);
|
|
update_post_meta($post->ID, "projekt_beschreibung", $_POST["projekt_beschreibung"]);
|
|
|
update_post_meta($post->ID, "projekt_link", $_POST["projekt_link"]);
|
|
update_post_meta($post->ID, "projekt_link", $_POST["projekt_link"]);
|
|
|
|
|
+ // baugruppen
|
|
|
|
|
+ update_post_meta($post->ID, "baugruppe_link", $_POST["baugruppe_link"]);
|
|
|
|
|
+ // clients
|
|
|
|
|
+ update_post_meta($post->ID, "client_link", $_POST["client_link"]);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
add_image_size( 'projekt_thumb', 355, 236, true);
|
|
add_image_size( 'projekt_thumb', 355, 236, true);
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
-Projekte
|
|
|
|
|
|
|
+
|
|
|
Baugrupen
|
|
Baugrupen
|
|
|
Kunden
|
|
Kunden
|
|
|
|
|
+Testimonials
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
|
|
|