How to print different informations for different post types inside The Loop?

Of course, you can use conditions like this inside the loop. if ( ‘event’ == get_post_type( get_the_ID() ) ) { // do something } Full code would be // The Loop if ( $query->have_posts() ) : ?> <?php if ( is_home() && ! is_front_page() ) : ?> <header> <h1 class=”page-title screen-reader-text”><?php single_post_title(); ?></h1> </header> <?php … Read more

Custom booking form field not saving

You have to save them somewhere like in the em_meta table or in the booking_meta field of the booking table (stored as a serialized array, so add to it, don’t replace it) and bring it up elsewhere. If you read the tutorials, you could quite easily add extra fields etc. http://wp-events-plugin.com/tutorials/ and this may help … Read more

Display content based on an event

If you have to add our message before/after content then you’re stuck with ‘the_content’ filter. It would be better if you put your message in a shortcode or hook so the theme customizations were more integrated. But essentially after you run your logic to get the status you just need to wait till the message … Read more

How to fire jQuery after $(window).on(‘load’)

It likely does not have to do with WordPress Core – in most cases this type of issue comes about when plugins conflict. I would suggest deactivating all your other plugins and trying a default theme, a la Twenty Seventeen. If it works at that point, you can switch the theme & test, then activate … Read more

Unable to sort wp_query by date/time with multiple meta_key s

Just an idea: you could save your time values in an array and then sort it with PHP. Example: $keys = array(‘opening_time’, ‘film_time’, ‘artist_talk_time’); $times = array(); $custom_field_keys = get_post_custom_keys(); foreach ($custom_field_keys as $custom_field_key) { if (in_array($custom_field_key, $keys) { $custom_field_value = get_post_meta($post->ID, $custom_field_key, true); if ($custom_field_value >= $thedate && $custom_field_value <= $future) { $counttest++; $times[$custom_field_key] … Read more

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