Fix
-
This widget modifies the global variable $post, modifying the behavior of other widgets. I used this fixed function:
//Display the sidebar posts if there are any. function get_post_to_sidebar_data(){ global $post_to_sidebar; global $post; $post_bak = $post; if ($post_to_sidebar) { foreach ($post_to_sidebar as $post): setup_postdata($post); ?> <div class="post-to-sidebar"> <?php the_title('<h3 class="widget-title">', '</h3>'); ?> <div class="sidebar-entry-content"> <?php the_content(); ?> <?php edit_post_link('Edit', ' | ', ' | '); ?> </div> </div> <?php endforeach; rewind_posts(); $post = $post_bak; setup_postdata($post); ?> <?php } }
- The topic ‘Fix’ is closed to new replies.