__('Header Menu'),
'footer' => __('Footer Menu')
) );
//Register sidebar and footer widget
function wp_backend_widgets_init() {
register_sidebar( array(
'name' => __( 'Footer Sidebar 1', 'wpbackend' ),
'id' => 'sidebar-1',
'description' => __( 'Footer Left Sidebar that appears on the left.', 'wpbackend' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 2', 'wpbackend' ),
'id' => 'sidebar-2',
'description' => __( 'Footer Left Sidebar that appears on the left.', 'wpbackend' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 3', 'wpbackend' ),
'id' => 'sidebar-3',
'description' => __( 'Footer Middle Sidebar that appears on the middle.', 'wpbackend' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 4', 'wpbackend' ),
'id' => 'sidebar-4',
'description' => __( 'Footer Right Sidebar that appears on the right.', 'wpbackend' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Page Sidebar', 'wpbackend' ),
'id' => 'page-sidebar',
'description' => __( 'Page Sidebar that appears on the specific pages.', 'wpbackend' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
) );
}
add_action( 'widgets_init', 'wp_backend_widgets_init' );
/*Commnet Popup*/
function comment_scripts(){
if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
}
add_action( 'wp_enqueue_scripts', 'comment_scripts' );
/*Enable Read More function in home page*/
function excerpt($num) {
$limit = $num+1;
$excerpt = explode(' ', get_the_excerpt(), $limit);
array_pop($excerpt);
$excerpt = implode(" ",$excerpt)."
Read More";
echo $excerpt;
}
/* Register Slider Custom Posts */
function create_post_type() {
register_post_type( 'slider',
array(
'labels' => array(
'name' => __( 'Slider' ),
'singular_name' => __( 'Slide' ),
'add_new' => __( 'Add New Slide' ),
'add_new_item' => __( 'Add New Slide' ),
'edit_item' => __( 'Edit Slide' ),
'new_item' => __( 'New Slide' ),
'view_item' => __( 'View Slide' ),
'not_found' => __( 'Sorry, we couldn\'t find any Slide that you are looking for.' )
),
'public' => true,
'publicly_queryable' => false,
'exclude_from_search' => true,
'menu_position' => 14,
'has_archive' => false,
'hierarchical' => false,
'capability_type' => 'page',
'rewrite' => array( 'slug' => 'slider' ),
'supports' => array( 'title', 'thumbnail' )
)
);
register_post_type( 'skills',
array(
'labels' => array(
'name' => __( 'Our Skills' ),
'singular_name' => __( 'Skill' ),
'add_new' => __( 'Add New Skill' ),
'add_new_item' => __( 'Add New Skill' ),
'edit_item' => __( 'Edit Skill' ),
'new_item' => __( 'New Skill' ),
'view_item' => __( 'View Skill' ),
'not_found' => __( 'Sorry, we couldn\'t find any Skill that you are looking for.' )
),
'public' => true,
'publicly_queryable' => false,
'exclude_from_search' => true,
'menu_position' => 14,
'has_archive' => false,
'hierarchical' => false,
'capability_type' => 'page',
'rewrite' => array( 'slug' => 'skills' ),
'supports' => array( 'title', 'thumbnail' ),
)
);
register_post_type( 'reviews',
array(
'labels' => array(
'name' => __( 'Client Reviews' ),
'singular_name' => __( 'Review' ),
'add_new' => __( 'Add New Review' ),
'add_new_item' => __( 'Add New Review' ),
'edit_item' => __( 'Edit Review' ),
'new_item' => __( 'New Review' ),
'view_item' => __( 'View Review' ),
'not_found' => __( 'Sorry, we couldn\'t find any Reviews that you are looking for.' )
),
'public' => true,
'publicly_queryable' => false,
'exclude_from_search' => true,
'menu_position' => 14,
'has_archive' => false,
'hierarchical' => false,
'capability_type' => 'page',
'rewrite' => array( 'slug' => 'reviews' ),
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
)
);
register_post_type( 'portfolios',
array(
'labels' => array(
'name' => __( 'Portfolios' ),
'singular_name' => __( 'Portfolio' ),
'add_new' => __( 'Add New Portfolio' ),
'add_new_item' => __( 'Add New Portfolio' ),
'edit_item' => __( 'Edit Portfolio' ),
'new_item' => __( 'New Portfolio' ),
'view_item' => __( 'View Portfolio' ),
'not_found' => __( 'Sorry, we couldn\'t find any Portfolio that you are looking for.' )
),
'public' => true,
'publicly_queryable' => false,
'exclude_from_search' => true,
'menu_position' => 14,
'has_archive' => false,
'hierarchical' => false,
'capability_type' => 'page',
'rewrite' => array( 'slug' => 'portfolios' ),
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
)
);
register_post_type( 'services',
array(
'labels' => array(
'name' => __( 'Our Services' ),
'singular_name' => __( 'Service' ),
'add_new' => __( 'Add New Service' ),
'add_new_item' => __( 'Add New Service' ),
'edit_item' => __( 'Edit Service' ),
'new_item' => __( 'New Service' ),
'view_item' => __( 'View Service' ),
'not_found' => __( 'Sorry, we couldn\'t find any Service that you are looking for.' )
),
'public' => true,
'publicly_queryable' => false,
'exclude_from_search' => true,
'menu_position' => 14,
'has_archive' => false,
'hierarchical' => false,
'capability_type' => 'page',
'rewrite' => array( 'slug' => 'services' ),
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
)
);
register_post_type( 'tutorials',
array(
'labels' => array(
'name' => __( 'Tutorials' ),
'singular_name' => __( 'Tutorials' ),
'add_new' => __( 'Add New Course' ),
'add_new_item' => __( 'Add New Course' ),
'edit_item' => __( 'Edit Course' ),
'new_item' => __( 'New Course' ),
'view_item' => __( 'View Course' ),
'not_found' => __( 'Sorry, we couldn\'t find any Course that you are looking for.' )
),
'public' => true,
'publicly_queryable' => false,
'exclude_from_search' => true,
'menu_position' => 14,
'has_archive' => false,
'hierarchical' => false,
'capability_type' => 'page',
'rewrite' => array( 'slug' => 'tutorials' ),
'supports' => array( 'title', 'editor', 'custom-fields' ),
)
);
register_post_type( 'next',
array(
'labels' => array(
'name' => __( 'What Next' ),
'singular_name' => __( 'What Next' ),
'add_new' => __( 'Add New' ),
'add_new_item' => __( 'Add What Next' ),
'edit_item' => __( 'Edit What Next' ),
'new_item' => __( 'New What Next' ),
'view_item' => __( 'View What Next' ),
'not_found' => __( 'Sorry, we couldn\'t find any What Next that you are looking for.' )
),
'public' => true,
'publicly_queryable' => false,
'exclude_from_search' => true,
'menu_position' => 14,
'has_archive' => false,
'hierarchical' => false,
'capability_type' => 'page',
'rewrite' => array( 'slug' => 'next' ),
'supports' => array( 'title', 'editor', 'custom-fields' ),
)
);
}
add_action( 'init', 'create_post_type' );
/*Thumbnail Image Support*/
add_theme_support( 'post-thumbnails', array( 'post', 'slider', 'skills', 'reviews', 'portfolios', 'services', 'tutorials', 'next' ) );
set_post_thumbnail_size( 340, 100, true );
add_image_size( 'post-image', 340, 100, true );
/*Slider Custom Posts Image*/
add_image_size( 'slider-image', 1200, 500, true );
/* Skill Custom Posts Image*/
add_image_size( 'skill-image', 180, 180, true );
/* Clients Review Custom Posts Image*/
add_image_size( 'client-image', 120, 150, true );
/* Portfolio Custom Posts Image*/
add_image_size( 'portfolio-image', 270, 270, true );
/* Services Custom Posts Image*/
add_image_size( 'service-image', 270, 270, true );
/* Theme Option Settings */
add_filter( 'ot_show_pages', '__return_false' );
add_filter( 'ot_show_new_layout', '__return_false' );
add_filter( 'ot_theme_mode', '__return_true' );
include_once( 'option-tree/ot-loader.php' );
include_once( 'includes/theme-options.php' );
?>