Title: Php help
Last modified: August 19, 2016

---

# Php help

 *  [mrvx](https://wordpress.org/support/users/mrvx/)
 * (@mrvx)
 * [16 years ago](https://wordpress.org/support/topic/php-help-9/)
 * Hi, below , inside the code I wrote with red my problem. I am very new in wordpress
   and also in php. Can anybody help me to get the result?
 * Cheers,
 * Veiko
 *     ```
       <?php
       	$ids = array();
       	$arr = array();
       	$i=1;
   
       	$width = 307;
       	$height = 195;
   
       	$featured_cat = get_option('onthego_feat_cat');
       	$featured_num = get_option('onthego_featured_num');
   
       	if (get_option('onthego_use_pages') == 'false') query_posts("showposts=$featured_num&cat=".get_catId($featured_cat));
       	else {
       		global $pages_number;
       		if (get_option('onthego_feat_pages') <> '') $featured_num = $pages_number - count(get_option('onthego_feat_pages'));
       		else $featured_num = $pages_number;
   
       		query_posts(array
       						('post_type' => 'page',
       						'orderby' => 'menu_order',
       						'order' => 'ASC',
       						'post__not_in' => get_option('onthego_feat_pages'),
       						'showposts' => $featured_num
       					));
       	};
   
       	while (have_posts()) : the_post();
   
       		$arr[$i]["title"] = truncate_title(50,false);
       		$arr[$i]["fulltitle"] = truncate_title(250,false);
       		$arr[$i]["excerpt"] = truncate_post(345,false);
       		$arr[$i]["tab_title"] = get_post_meta($post->ID, 'Tab', $single = true);
       		if ($arr[$i]["tab_title"] == '') $arr[$i]["tab_title"] = 'Tab custom field';
       		$arr[$i]["permalink"] = get_permalink();
   
       		$arr[$i]["thumbnail"] = get_thumbnail($width,$height,'',$arr[$i]["fulltitle"],$arr[$i]["tab_title"]);
       		$arr[$i]["thumb"] = $arr[$i]["thumbnail"]["thumb"];
       		$arr[$i]["use_timthumb"] = $arr[$i]["thumbnail"]["use_timthumb"];
   
       		$i++;
       		$ids[]= $post->ID;
       	endwhile; wp_reset_query();	?>
   
       <!-- Featured Slider -->
       <div id="featured-slider">
       <div id="buildings"></div>
       <ul id="slider-control">
       <?php for ($i = 1; $i <= $featured_num; $i++) { ?>
       <li<?php if ($i == 1) echo(' class="active"');?>><a href="#"><span><?php echo($arr[$i]["tab_title"]); ?></span></a></li>
       <?php }; ?>
       </ul> <!-- #slider-control -->
       <div id="featured-area">
   
       <div id="feat-content">
       <?php for ($i = 1; $i <= $featured_num; $i++) { ?>
       <div class="featitem clearfix">
   
       <div class="featured-image">
   
       <strong>somewhere here I need to put "if" statement that makes exception to some slider slides, where I need to put flash video. I would like to use "get_post_meta" that recodnizes the slide which I need to put flash swf and embed video code could be here inside this php file. There is no need to change the video in GUI. </strong>
   
       <a href="<?php echo($arr[$i]["permalink"]); ?>" title="<?php printf(__('Permanent Link to %s', 'OnTheGo'), $arr[$i]["fulltitle"]) ?>">
       <?php print_thumbnail($arr[$i]["thumb"], $arr[$i]["use_timthumb"], $arr[$i]["fulltitle"] , $width, $height); ?>
       </a>
       </div> <!-- .featured-image -->
   
       <div class="description">
       <h2><a href="<?php echo($arr[$i]["permalink"]); ?>" title="<?php printf(__('Permanent Link to %s', 'OnTheGo'), $arr[$i]["fulltitle"]) ?>"><span><?php echo($arr[$i]["title"]); ?></span></a></h2>
       <p><?php echo($arr[$i]["excerpt"]); ?></p>
       </div> <!-- .description -->
   
       <a href="<?php echo($arr[$i]["permalink"]); ?>" title="<?php printf(__('Permanent Link to %s', 'OnTheGo'), $arr[$i]["fulltitle"]) ?>" class="readmore"><span><?php _e('Read More','OnTheGo'); ?></span></a>
   
       </div> <!-- .featitem -->
       <?php }; ?>
   
       </div> <!-- #feat-content -->
   
       <a href="#" id="prevlink"><?php _e('Previous','OnTheGo'); ?></a>
       <a href="#" id="nextlink"><?php _e('Next','OnTheGo'); ?></a>
   
       </div> <!-- #featured area -->
   
       </div> <!-- #featured slider -->
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [16 years ago](https://wordpress.org/support/topic/php-help-9/#post-1487217)
 * I don’t see the aforementioned red text. Can you describe what your problem is
   or what you’re trying to accomplish?
 *  Thread Starter [mrvx](https://wordpress.org/support/users/mrvx/)
 * (@mrvx)
 * [16 years ago](https://wordpress.org/support/topic/php-help-9/#post-1487218)
 * Sorry for the duplicate post.
 * [I try to accomplish like in this screenshot.](http://flashbannerid.ee/scr.png)
 * [The homepage I am building is here ](http://pikse.ee/et)
 * The slider is made to work with images not swf files.
 * I want to add one exception to one slide, which must show swf video.
 * I understand that this must be done in the php file.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [16 years ago](https://wordpress.org/support/topic/php-help-9/#post-1487219)
 * I’m sure that it can be done, but the howto is a bit out of my league. I’m sure
   that there’s someone else here who can help with that, and I’d love to know the
   solution too.
 *  [harrismc](https://wordpress.org/support/users/harrismc/)
 * (@harrismc)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/php-help-9/#post-1487523)
 * How do you post images in slider ?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Php help’ is closed to new replies.

 * 4 replies
 * 3 participants
 * Last reply from: [harrismc](https://wordpress.org/support/users/harrismc/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/php-help-9/#post-1487523)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
