WP calendar summary attribute validation error

Update to 3.2.2. The summary attribute has been removed. See line 1149 \wp-includes\general-template.php WP v3.1.4: $calendar_output=”<table id=”wp-calendar” summary=”” . esc_attr__(‘Calendar’) . ‘”> WP v3.2.2: $calendar_output=”<table id=”wp-calendar”> Alternatives… To modify the output of the widget, you can duplicate it and rename it. When I did that, I also needed to duplicate the get_calendar() function and adjust … Read more

Modify query after meta value

Here’s an example using WP_Query‘s meta_query to query posts between two meta key values: $meta_query = array( array( ‘key’ => ‘event_date’, ‘value’ => array( $date_start, $date_end ), ‘compare’ => ‘BETWEEN’ ) ); $args = array( ‘posts_per_page’ => -1, ‘meta_key’ => ‘event_date’, ‘orderby’ => ‘meta_value’, ‘meta_query’ => $meta_query ); $results = new WP_Query( $args );

Post Terms As Class Name For Full Calendar Events

You are using get_single_term in a way that would require it to return a value… $term = get_single_term($post->ID, ‘course_locations’); … but you have written it in such a way that it echos a value. You should have… function get_single_term($post_id, $taxonomy) { $terms = wp_get_object_terms($post_id, $taxonomy); if(!is_wp_error($terms)) { return $terms[0]->name; } } I noticed a couple … Read more

Help with query function get_calendar()

The line you quote doesn’t actually query any posts. It’s just a very general check if there are any posts at all ever. The issue with parts of WP core like this, is that WordPress is engineered to query sets of posts. Whenever said sets might get extremely large — it mostly has to abandon … Read more

Include custom table in query

Working code: <?php global $wpdb; $date = date(“Y-m-d”); $querystr = ” SELECT * FROM wp_posts JOIN wp_ftcalendar_events ON wp_posts.ID = wp_ftcalendar_events.post_parent WHERE wp_posts.post_status=”publish” AND wp_posts.post_type=”post” AND wp_ftcalendar_events.start_datetime >= ‘$date’ ORDER BY wp_ftcalendar_events.start_datetime ASC “; $pageposts = $wpdb->get_results($querystr, OBJECT_K); ?> <?php if ($pageposts): ?> <?php global $post; ?> <?php foreach ($pageposts as $post): ?> <?php setup_postdata($post); … Read more

Create a new post on a specified publish date via link?

Here is the solution I came up with! In my plugin functions: <?php function ficma_inline_script() { $datedata = explode(“-“, $_POST[‘date’]); $year = $datedata[0]; $month = $datedata[1]; $day = $datedata[2]; $newdate = date(“M d, Y”, mktime(0, 0, 0, $month, $day, $year)); ?> <script type=”text/javascript”> document.getElementById(“mm”).value = “<?=$month ?>”; document.getElementById(“cur_mm”).value = “<?=$month ?>”; document.getElementById(“hidden_mm”).value = “<?=$month ?>”; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)