WP Calendar Shortcode not working on my theme
Can’t comment, so: the doc says you should just put {event_calendar} in your page template (between <?php ?> tags. So it’s a tag you can use in your theme, NOT a shortcode.
Can’t comment, so: the doc says you should just put {event_calendar} in your page template (between <?php ?> tags. So it’s a tag you can use in your theme, NOT a shortcode.
How to change Calendar military time to eastern standard?
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
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
date archive future posts
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
A simple way to achieve this would be through IFFT connection between WordPress & Google Calender. It’s already done there for you, and there is a tutorial specifically for it. On the downside, you will need to create an IFFT account, and the connection happens outside your server (i.e. you are dependent). Check it out … Read more
Your event target (#calender_section a) is replaced after refreshing the calendar. Because of the replacing, the event listener isn’t applied to the target anymore. You have to apply the event listener to a parent element which doesn’t get replaced (here it is #calendrier_wrapper) and use the selector parameter of on (see http://api.jquery.com/on/): $(“#calendrier_wrapper”).on(‘click’, ‘#calender_section a’, … Read more
Figured it out! First I passed what Iceable suggested and also added moment script above, like so wp_register_script(‘moment’, “https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js”); wp_register_script( ‘fullcalendar’, “https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js”, array( ‘jquery’ ), null, true); and then I edited JS like so jQuery(function ($) { $(‘#calendar’).fullCalendar({ }) }); And it showed up!
The calendar widget doesn’t link to “each day’s post”. It’s linking to an archive page that lists all posts made on that date. Hence the /2019/08/01/ URL. If you click the post title (or “Continue Reading” or “Read More” link if there is one) you will be taken to the single post whose URL will … Read more