Send Newsletter-Email when post changes

You can use a hook developed for such kind of purposes: post_updated Use this hook whenever you need to compare values before and after the post update. Lets get some codding: function mail_on_update($post_ID, $post_after, $post_before){ if($post_after->post_content != $post_before->post_content){ // wp_mail() , mail() here } } add_action( ‘post_updated’, ‘mail_on_update’, 10, 3 ); // 10 – priority, … Read more

Display WordPress Post By Date

i think your question has been answered in here $args = array(‘posts_per_page’ => -1, ‘orderby’ => ‘date’ ); $myQuery = new WP_Query($args); $date=””; if ( $myQuery->have_posts() ) : while ( $myQuery->have_posts() ) : $myQuery->the_post(); if ( $date != get_the_date() ) { echo $date; echo ‘<hr />’; $date = get_the_date(); } the_title(); // or whatever you … Read more

Difficulty in creating and handling a complex post type

If you haven’t already, I’d suggest looking at the Advanced Custom Fields plugin. They have two custom fields that might help a lot in this situation: Post Object and Relationship. Browse all their custom fields here. What these allow you to do, essentially (insofar as my understanding goes…), is to link one post (a restaurant, … Read more

Add row after three columns

Here’s an idea of what I think you could do if I understand the problem correctly: <div id=”primary” class=”content-area”> <main id=”main” class=”site-main” role=”main”> <div class=” entry-content”> <?php if ( have_posts() ) { $post = $posts[0]; $c = 0; $i = 0; while ( have_posts() ) { the_post(); // start a new row for the first … Read more