Title: Theme function extending
Last modified: August 21, 2016

---

# Theme function extending

 *  [RSLiam](https://wordpress.org/support/users/rsliam/)
 * (@rsliam)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/theme-function-extending/)
 * Using the Theme ZeeDynamic. I’m trying to modify it to show frontpage blog posts
   from multiple categories. Direct theme support is paid, so I’m here instead!
 * Settings to tell theme to use posts from specific category (settings-frontpage.
   php)
 *     ```
       ### FRONTPAGE POSTS
       		#######################################################################################
       		$themezee_settings[] = array("name" => __('Display Latest Blog Posts?', 'zeeDynamic_language'),
       						"desc" => __('Check this to show the latest blog posts in the normal blog layout on the frontpage template', 'zeeDynamic_language'),
       						"id" => "themeZee_frontpage_posts_active",
       						"std" => "false",
       						"type" => "checkbox",
       						"section" => "themeZee_frontpage_posts");
   
       		$themezee_settings[] = array("name" => __('Latest Blog Posts Category', 'zeeDynamic_language'),
       						"desc" => __("Select the category of which the latest blog posts should be displayed.", 'zeeDynamic_language'),
       						"id" => "themeZee_frontpage_posts_category",
       						"std" => "",
       						"type" => "select",
       						'choices' => $categories_slider,
       						"section" => "themeZee_frontpage_posts");
   
       		return $themezee_settings;
       	}
       ```
   
 * Function to call that query (functions.php)
 *     ```
       // Retrieve Frontpage Posts Query
       function themezee_frontpage_posts_query($paged) {
   
       	// Get Query Arguments
       	$options = get_option('zeedynamic_options');
       	$frontpage_posts_category = $options['themeZee_frontpage_posts_category'];
   
       	$query_arguments = array(
       		'post_type' => 'post',
       		'post_status' => 'publish',
       		'ignore_sticky_posts' => true,
       		'posts_per_page' => 4,
       		'paged' => $paged,
       		'orderby' => 'date',
       		'order' => 'DESC',
       		'category_name' => $frontpage_posts_category
       		);
   
       	$zee_frontpage_posts_query = new WP_Query($query_arguments);
   
       	return $zee_frontpage_posts_query;
       ```
   

Viewing 1 replies (of 1 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/theme-function-extending/#post-4248531)
 * please post in the theme’s forum [http://wordpress.org/support/theme/zeedynamic](http://wordpress.org/support/theme/zeedynamic)

Viewing 1 replies (of 1 total)

The topic ‘Theme function extending’ is closed to new replies.

## Tags

 * [front page](https://wordpress.org/support/topic-tag/front-page/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/theme-function-extending/#post-4248531)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
