homepage = "Homepage"; $this->shorthomepage = ""; $this->options_homepage = array( array( "name" => "Homepage", "type" => "title" ), array( "name" => "numbers of home page", "id" => "_n_of_home_post", "std" => "" ), array( "name" => "hide top posts", "id" => "_hide_top_posts", "std" => "" ), array( "name" => "hide slider", "id" => "_hide_slider", "std" => "" ) ); $cats = get_categories('hide_empty=0'); $site_cats = array(); foreach ($cats as $cat) { array_push($this->options_homepage, array( "name" => "top_cat" . $cat->cat_ID, "id" => "top_cat" . $cat->cat_ID, "std" => "") ); array_push($this->options_homepage, array( "name" => "content_cat" . $cat->cat_ID, "id" => "content_cat" . $cat->cat_ID, "std" => "") ); } } /// save changes or reset options public function web_dorado_theme_update_and_get_options_home(){ if (isset($_GET['page']) && $_GET['page'] == "web_dorado_theme" && isset($_GET['controller']) && $_GET['controller'] == "home_page") { if (isset($_REQUEST['action']) && $_REQUEST['action']=='save' ) { foreach ($this->options_homepage as $value) { set_theme_mod($value['id'], $_REQUEST[$value['id']]); } foreach ($this->options_homepage as $value) { if (isset($_REQUEST[$value['id']])) { set_theme_mod($value['id'], $_REQUEST[$value['id']]); } else { remove_theme_mod($value['id']); } } header("Location: themes.php?page=web_dorado_theme&controller=home_page&saved=true"); die; } else { if (isset($_REQUEST['action']) && $_REQUEST['action']=='reset') { foreach ($this->options_homepage as $value) { remove_theme_mod($value['id']); } header("Location: themes.php?page=web_dorado_theme&controller=home_page&reset=true"); die; } } } } public function web_dorado_home_page_admin_scripts(){ wp_enqueue_style('home_page_main_style',get_bloginfo('template_directory').'/admin/css/home_page.css'); } public function dorado_theme_admin_home(){ if(isset($_REQUEST['controller']) && $_REQUEST['controller']=='home_page'){ if (isset($_REQUEST['saved']) && $_REQUEST['saved'] ) echo '

Home settings are saved.

'; if (isset($_REQUEST['reset']) && $_REQUEST['reset'] ) echo '

Home settings are reset.

'; } ?>
User Manual
This section allows you to customize the homepage. More...

Get the full version    

Home

Number of Posts

Specify the number of content posts to be displayed on the homepage.

">

Hide Slider

Using this option, you can hide the homepage slider.

/>

Hide Top Posts

Using this option, you can hide the top posts from the homepage.

/>

Select the categories from which you want the homepage top posts to be selected (the posts are selected automatically).

cat_ID; ?>" class="checkbox" id="cat_ID; ?>" cat_ID), "on" ); ?> />


Select Categories for Content Posts

Select the categories from which you want the homepage content posts to be selected (the posts are selected automatically).

cat_ID; ?>" id="cat_ID; ?>" cat_ID), "on" ); ?> />