=' ) ){ add_theme_support( 'custom-header' ); add_theme_support( 'custom-background' ); }else{ add_custom_image_header( $args ); add_custom_background( $args ); } //Call css files add_action( 'wp_enqueue_scripts', 'aebpg_get_stylesheets' ); function aebpg_get_stylesheets() { wp_register_style( 'aebpg-style', get_template_directory_uri().'/style.css', '','', 'only screen and (min-width: 961px)' ); wp_enqueue_style( 'aebpg-style' ); wp_register_style( 'aebpg-tablet', get_template_directory_uri().'/tablet.css', '','', 'only screen and (min-width: 651px) and (max-width: 960px)' ); wp_enqueue_style( 'aebpg-tablet' ); wp_register_style( 'aebpg-mobile', get_template_directory_uri().'/mobile.css', '','', 'only screen and (min-width: 0px) and (max-width: 651px)' ); wp_enqueue_style( 'aebpg-mobile' ); } //Create new post type for gallery add_action( 'init', 'aebpg_create_post_type' ); function aebpg_create_post_type() { register_post_type( 'aeb_gallery', array( 'labels' => array( 'name' => __( 'Photo Gallery' ) ), 'public' => true, 'has_archive' => true, 'exclude_from_search' => true, 'supports' => array('title', 'editor', 'thumbnail'), ) ); add_theme_support( 'post-thumbnails' ); remove_post_type_support( 'aeb_gallery', 'editor'); } //Header menu function function aebpg_get_aeb_gallery_menu(){ $menu_name = 'main-menu'; $locations = get_nav_menu_locations(); if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) { $menu = wp_get_nav_menu_object( $locations[ $menu_name ] ); $menu_items = wp_get_nav_menu_items($menu->term_id ); $menu_list = ''; echo $menu_list; } } //Increase post per page for gallery function aebpg_change_posts_pp($query){ switch ( $query->query_vars['post_type'] ) { case 'aeb_gallery': $query->query_vars['posts_per_page'] = 14; break; default: break; } return $query; } if( !is_admin() ){ add_filter( 'pre_get_posts', 'aebpg_change_posts_pp' ); } //Pagination Function function aebpg_get_aeb_paging(){ global $paged, $wp_query; if(empty($paged)) $paged = 1; $totalpages = $wp_query->max_num_pages; if($totalpages > 1){ echo ""; } } //Create header menu bar register_nav_menus( array( 'main-menu' => 'AEB Theme Main Menu' ) ); //Category display change function aebpg_cat_wrap($input) { if($input != ""){ $output = '

Categories: '.$input.'

'; } return $output; } if(!is_admin()) add_filter('the_category','aebpg_cat_wrap'); //Add Media Upload button add_action( 'add_meta_boxes', 'aebpg_add_media_gallery_box' ); function aebpg_add_media_gallery_box(){ add_meta_box( 'aeb-gallery-admin2', 'Media Gallery', 'aebpg_get_media_gallery_content', 'aeb_gallery', 'advanced' ); } function aebpg_get_media_gallery_content(){ echo '
Upload/Insert
'; } //Add Donation Link to Gallery Admin add_action( 'add_meta_boxes', 'aebpg_add_donation_box' ); function aebpg_add_donation_box() { add_meta_box( 'aeb-gallery-admin', 'Donations & Support for the Theme Developer', 'aebpg_get_the_donation_content', 'aeb_gallery', 'advanced' ); } function aebpg_get_the_donation_content() { echo 'You can contact me anytime for your web development requests on ensarbaylar@yandex.com , also please help me to help you by donating even with a little amount, so I can keep developing free themes.
'; } //Change readmore suffix function aebpg_new_excerpt_more( $more ) { return '...'; } add_filter('excerpt_more', 'aebpg_new_excerpt_more'); //Create Sidebar register_sidebar(array( 'id' => 'side-bar-special', 'before_widget' => '
', 'name' => __( 'Side Bar', $text_domain ), 'description' => __( 'This is the side bar on right.', $text_domain ), )); ?>