Tag Info

Hot answers tagged

3

I would think the beats are Staggered by nature, becasue the next tick is determined by the browser time time() within the scheduleNextTick() method in the /wp-includes/js/heartbeat.jsfile: var delta = time() - settings.lastTick, interval = settings.mainInterval; where it's used to schedule the next tick with the setTimeout function: if ( delta ...


2

Linux users have nothing to do with WordPress users. WordPress maintains its own user database, with its own permissions. The linux user PHP is running as is determined by the server setup, usually whatever user that Apache/Nginx/etc are running as. If your PHP can access the entire file system then you have a serious security issue and should contact your ...


1

Here is a great example. How to display featured post thumbnails in WordPress feeds paste this code snippet in your theme functions.php file // display featured post thumbnails in WordPress feeds function wcs_post_thumbnails_in_feeds( $content ) { global $post; if( has_post_thumbnail( $post->ID ) ) { $content = '<p>' . ...


1

You can include this code by creating a new custom plugin which help you to stop this when you deactivate the plugin. wp_schedule_event(time(), 'daily', 'my_dailyClearOut'); function my_clearOldUsers() { global $wpdb; $query = $wpdb->prepare("SELECT ID FROM $wpdb->users WHERE datediff(now(), user_registered) > 7"); if ($oldUsers = ...


1

If your update_option call runs after you assign $posts1 and $posts2, then of course they'll hold the "old" value, even if you sleep for eternity ;) Either run the update earlier, or (re)assign the variables afterwards. $posts1 = get_option( 'post1' ); echo get_option( 'post1' ); // [my_id] echo $posts1; // [my_id] update_option( 'post1', 'foobar' ); ...


1

Use pre_get_posts instead.. function my_archive_query_override( $query ) { if ( $query->is_archive() && $query->is_main_query() ) { $query->set( 'orderby', 'rand' ); } } add_action( 'pre_get_posts', 'my_archive_query_override' ); For that user selectable part, you can use AJAX to accomplish that.


1

The code you need will vary slightly depending on whether the Conference field is storing a text string (like "Big Ten") vs. the ID of the Conference post. I'll include both: Text String Example // place this code inside the loop of your single-team template $conference_name = get_post_meta( get_the_id(), 'conference', true ); $conference = ...



Only top voted, non community-wiki answers of a minimum length are eligible