Insert Into Post Not Working For Audio File Using jQuery

I have come up with better and new working version that supports all file types which I am going to share here in case anyone else is looking for this answer. Input field added to metabox <input type=”text” name=”sermon_mp4″ id=”sermon_mp4″ value=”<?php echo $sermonmp4; ?>”/> <input type=”button” id=”sermon_mp4_button” value=”Add Sermon Audio” /> jQuery <script type = … Read more

Update a user profile via frontend

I’ve written this in a hurry and it’s untested and probably sloppy code, but it gives you an idea of how to accomplish this with AJAX. <form id=”update_user”> <div class=”form-group”> <label for=”firstname”>Name</label> <input type=”text” name=”firstname” id=”firstname” value=”<?= esc_attr(wp_get_current_user()->user_firstname) ?>” placeholder=”Vorname”> </div> <div class=”form-group”> <label for=”name”>Name</label> <input type=”text” name=”name” id=”name” value=”<?= esc_attr(wp_get_current_user()->user_lastname) ?>” placeholder=”Name”> </div> <div … Read more

Display time difference (6 hours ago) in a Soliloquy caption

In your filter function you should pass post ID to get_the_time() function, otherwise you will get the date from current post. function wpse_relative_date( $date, $format, $post ) { return human_time_diff( get_the_time(‘U’, $post), current_time( ‘timestamp’ ) ) . ‘ ago’; } add_filter( ‘get_the_date’, ‘wpse_relative_date’, 15, 3 ); References: get_the_time() function get_the_date filter

per blog metadata for plugin

Options are site specific, so you just need to use update_option() and get_option(). The network-wide equivalents are update_network_option() and get_network_option(). Note that update_site_option() is just a wrapper for update_network_option(), and is an older name from when a multisite network was (confusingly) called a ‘site’. The same applies for get_site_option().