I created a widget to display ads related to the posts on my deals blog. The purpose of this widget is to display my affiliate links on all the blogs sidebar
function kish_get_deals() {
global $blog_id;
$current_blog=$blog_id;
$dealblogid=8;
switch_to_blog($dealblogid);
global $post;
$myposts = get_posts('numberposts=5&orderby=rand');
?>
<h4 class="widget">Deals - Check it out</h4>
<div style="margin: 5px;background: none transparent scroll repeat 0% 0%;padding: 5px">
<?php
foreach($myposts as $post) :
setup_postdata($post);
?>
<div style="margin-top: 3px">
<li><a href="<?php editable_post_meta($post->ID, " target="_blank">"><?php editable_post_meta($post->ID, "dtitle"); ?></a>
<?php editable_post_meta($post->ID, "ddesc"); ?>
<?php editable_post_meta($post->ID, "durl"); ?><a title="Permanent Link to <?php the_title(); ?>" rel="bookmark" href="<?php the_permalink() ?>"> ΒΆ</a>
</li>
</div>
<?php endforeach;?></div>
<?php switch_to_blog($current_blog);
}
You need to manually add the post_meta fields (custom fields) for those particular blog posts. As I am using the front end editor, I have used the different function, you can change that to get_post_meta function instead. You can add this to your sidebar and if you are using thesis theme, add it to your custom functions.php
Creating a Widget for Displaying Random Category Post - I just created a small hack to display posts from
Twitter Plugin for WordPress Updated - I just have updated the new version of Kish Twitte
Thesis Theme Works With WordPress MU - I recently got thesis theme for my blog, but the p Delete WordPress Post From Frontend - If you are logged in as the admin, you can add a l


