merhaba değerli webmaster arkadaşlar elimde bir
HABER TEMASI var ve ben bu temayı geliştirmeye çalışıyorum ama temanın bileşenine gazete kodu eklemeye çalışıyorum hata veriyor bana bu kodu eklememde yardımcı olurmusunuz bilişen kodu budur
<?php
######################################################################################
# YanPopulerHaberler
######################################################################################
class YanPopulerHaberler extends WP_Widget {
function __construct() {
$widget_options = array( 'description' => 'Yan menu için popüler haberler' );
parent::WP_Widget(false,'(Yan) Popüler Haberler', $widget_options );
}
function widget($args, $instance) {
extract($args);
$sayi = $instance['sayi'];
$tip = $instance['tip'];
if(empty($sayi)) {
$sayi = "4";
}
if(empty($tip)) {
$tip = "tip1";
}
echo $before_widget;
?>
<div class="yan-haber-blok bilesen populer-haberler">
<div class="bilesen-baslik">
<h2 class="sol">
<i class="icon-star"></i>
Popüler Haberler
</h2>
</div>
<div class="ic">
<?php
query_posts("cat={$kategori}&showposts={$sayi}&v_sortby=views");
while ( have_posts() ) : the_post();
global $post;
?>
<?php if($tip == "tip1") { ?>
<div class="t tip1">
<a class="sol" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php wptr_portal_resim($post->ID,"boyut140x110"); ?>
</a>
<h3 class="sag">
<a title="<?php the_title(); ?>"href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h3>
</div>
<?php } elseif($tip == "tip2") { ?>
<div class="t tip2">
<a class="db" title="<?php the_title(); ?>"href="<?php the_permalink(); ?>">
<span class="db to"><?php the_title(); ?></span>
<?php wptr_portal_resim($post->ID); ?>
</a>
</div>
<?php } else { ?>
<div class="t tip0">
<a class="sol" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php wptr_portal_resim($post->ID,"boyut110x70"); ?>
</a>
<h3 class="sag">
<a title="<?php the_title(); ?>"href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<span class="tarih db"><?php wptr_portal_tarih(strtotime($post->post_date_gmt), $post->post_date); ?></span>
</h3>
</div>
<?php } ?>
<?php
endwhile;
wp_reset_query();
?>
</div>
</div><!--/haber-blok-->
<?php
echo $after_widget;
}
function update($new_instance, $old_instance) {
return $new_instance;
}
function form($instance) {
if(isset($instance['sayi'])) {
$sayi = $instance['sayi'];
}
if(isset($instance['tip'])) {
$tip = $instance['tip'];
}
?>
<p>
<label for="<?php echo $this->get_field_id( 'sayi' ) ;?>">Kaç adet haber görünsün:</label>
<input
type="text" id="<?php echo $this->get_field_id( 'sayi' ) ;?>"
class="widefat" value="<?php echo $sayi; ?>" name="<?php echo $this->get_field_name( 'sayi' ) ;?>"
/>
</p>
<p>
<div><label for="<?php echo $this->get_field_id( 'tip' ) ;?>">Listeleme tipi:</label></div>
<select name="<?php echo $this->get_field_name( 'tip' ) ;?>" id="<?php echo $this->get_field_id( 'tip' ) ;?>">
<option value="tip0" <?php selected( $tip, "tip0" ); ?>>Tip 0(resimler çok küçük)</option>
<option value="tip1" <?php selected( $tip, "tip1" ); ?>>Tip 1(resimler küçük)</option>
<option value="tip2" <?php selected( $tip, "tip2" ); ?>>Tip 2(resimler büyük)</option>
</select>
</p>
<?php if(!function_exists('the_views')) {?>
<p style="color:red">
Popüler haberleri listeleyebilmek için WP-Postviews eklentisinin sitenizde kurulu olması lazım!
</p>
<?php } ?>
<?php
}
}
register_widget( 'YanPopulerHaberler' );benim bilişene eklemek istediğim kodda budur
<div style="width: 300px; height: 225px; overflow: hidden;"><iframe width="300" height="225" src="http://www.butungazetemansetleri.com/gazeteler-kodu.php" frameborder="0" scrolling="no"></iframe>
<br /><a href="http://www.butungazetemansetleri.com/" title="Gazete Manşetleri">Gazete Manşetleri</a></div>
bu kodu yokarıda vermiş olduğum php bilişen koduna eklermisiniz size zahmet birde konu yanlış yerdeyse lutfen moderatör tarafından doğru yere taşına bilirm teşekkürler..