Get posts after today (upcoming events)

Hi @user2816: It would seem you are using that code in more than one widget? Try changing part of that code from these: function filter_whene($whene=””) { $whene .= ” AND post_date >= ‘” . date(‘Y-m-d’) . “‘ “; return $whene; } add_filter(‘posts_whene’, ‘filter_whene’); To this: if (!function_exists(‘filter_whene’)) { function filter_whene($whene=””) { $whene .= ” AND … Read more

How to list all custom post types in a custom widget?

Figured out how (Thanks to WordPress Codex): /** @see WP_Widget::widget */ function widget($args, $instance) { extract( $args ); $title = apply_filters(‘widget_title’, $instance[‘title’]); ?> <?php echo $before_widget; ?> <?php if ( $title ) echo $before_title . $title . $after_title; ?> <?php // Create and run custom loop $custom_posts = new WP_Query(); $custom_posts->query(‘post_type=page_content’); while ($custom_posts->have_posts()) : $custom_posts->the_post(); … Read more

Adding a Widget : what to put in plugin URL

When adding a plugin to WordPress.org plugin repository you need to host the plugin somewhere (anywhere) and that is the “Plugin URL” so the good guys at WordPress could download it, test it and approve it to be listed. so just upload it to your host and enter the url to the zip file. Once … Read more