Ja - det ville være logisk :-) Men desværre ser koden i min sidebar bare sådan her ud:
<!-- begin sidebar -->
<div id="sidebar">
<?php
if ( !dynamic_sidebar("Sidebar One") ) : ?>
<div class="side-widget">
<?php include 'searchform.php'; ?>
</div>
<div class="side-widget">
<?php _e('<h2>Links</h2>', "magazine-basic"); ?>
<?php wp_list_bookmarks('title_li=&categorize=0'); ?>
</div>
<div class="side-widget">
<?php _e('<h2>Calendar</h2>', "magazine-basic"); ?>
<?php get_calendar(); ?>
</div>
<?php endif; ?>
</div>
<!-- end sidebar -->
Og min second sidebar:
<!-- begin second sidebar -->
<div id="secondsidebar">
<?php
if ( !dynamic_sidebar("Sidebar Two") ) : ?>
<div class="side-widget">
<?php _e('<h2>Archives</h2>', "magazine-basic"); ?>
<?php wp_get_archives('type=monthly'); ?>
</div>
<div class="side-widget">
<?php _e('<h2>Tags</h2>', "magazine-basic"); ?>
<?php wp_tag_cloud(); ?>
</div>
<?php endif; ?>
</div>
<!-- end second sidebar -->
Og det er jo ikke nogle af de ting jeg har i mine sidebare! Så jeg er virkelig lost
Tænkte at det så måske kunne være i widget_feature-filen, men her kan jeg heller ikke finde det:-(
<?php
function widget_sideFeature() {
$options = get_option("widget_sideFeature");
$numberOf = $options['number'];
$category = $options['category'];
$category = "&cat=" . $category;
$showposts = "posts_per_page=" . $numberOf . $category ;
?>
<?php
$featuredPosts = new WP_Query();
$featuredPosts->query($showposts);
?>
<?php $i = 1; ?>
<?php while ($featuredPosts->have_posts()) : $featuredPosts->the_post(); ?>
<h1 class="side">"><?php the_title(); ?></h1>
<div class="meta">
<?php _e("By", "magazine-basic"); echo " "; the_author_posts_link(); ?>
</div>
<div class="storycontent <?php if($numberOf == $i) { echo "noline"; } $i++; ?>">
<?php theme_excerpt('25'); ?>
</div>
<?php
endwhile;
}
function widget_myFeature($args) {
extract($args);
$options = get_option("widget_sideFeature");
echo $before_widget;
echo $before_title;
echo $options['title'];
echo $after_title;
widget_sideFeature();
echo $after_widget;
}
function myFeature_control()
{
$options = get_option("widget_sideFeature");
if (!is_array( $options ))
{
$options = array(
'title' => 'Feature',
'number' => '1',
'category' => '0'
);
}
if (!empty($_POST['sideFeature-Submit']))
{
$options['title'] = htmlspecialchars($_POST['sideFeature-WidgetTitle']);
$options['number'] = htmlspecialchars($_POST['sideFeature-PostNumber']);
if ( $options['number'] > 5) { $options['number'] = 5; }
$options['category'] = htmlspecialchars($_POST['sideFeature-Category']);
update_option("widget_sideFeature", $options);
}
?>
<p>
<label for="sideFeature-WidgetTitle"><?php _e('Title: ', "magazine-basic"); ?></label>
<input class="widefat" type="text" id="sideFeature-WidgetTitle" name="sideFeature-WidgetTitle" value="<?php echo $options['title'];?>" />
<label for="sideFeature-PostNumber"><?php _e('Number of posts to show: ', "magazine-basic"); ?></label>
<input type="text" id="sideFeature-PostNumber" name="sideFeature-PostNumber" style="width: 25px; text-align: center;" maxlength="1" value="<?php echo $options['number'];?>" />
<small><?php _e('(max 5)', "magazine-basic"); ?></small>
<label for="sideFeature-Category"><?php _e('From which category: ', "magazine-basic"); ?></label>
<?php
$options = get_option("widget_sideFeature");
$category = $options['category'];
?>
<?php wp_dropdown_categories('name=sideFeature-Category&selected='.$category); ?>
<input type="hidden" id="sideFeature-Submit" name="sideFeature-Submit" value="1" />
<p><small><?php _e('(Note: Posts displayed in this widget will be excluded from the main content on the index page)', "magazine-basic"); ?></small></p>
</p>
<?php
}
wp_register_sidebar_widget( 'featured_post', __('MB - Featured Post', "magazine-basic"), 'widget_myFeature', array('description' => __('Displays featured posts from one category', "magazine-basic")) );
wp_register_widget_control( 'featured_post', __('MB - Featured Post', "magazine-basic"), 'myFeature_control');
?>
Jeg håber det bare er natten der har gjort mig blind ;-)
PS: Plejer at hive ned via ftp og edit i noteblok, men det er nogen gange lidt hurtigere at kigge mange filer igennem inde i administrationsmodulet :-)