6

I addressed a similar problem not long ago - it's all in the memory: $post_ids = get_posts( array( 'posts_per_page' => -1, 'post_status' => 'publish', 'fields' => 'ids', // Just grab IDs instead of pulling 1000's of objects into memory ) ); update_object_term_cache( $post_ids, 'post' ); // Cache all the post terms ...


5

tl;dr Usually you should be safe by offering your Plugins in English first. If you create a good userbase, you could do your own resarch as to find out which languages are most important to your clients. Another thing to consider would be, if you want to support latin-signs only or if you want to offer all kinds of language signs. The big prolbem (for me) ...


5

You are hiting the db with a 500 mile per hour hurricane, no wonder your query times out. Here is an idea or two to speed things up Add 'fields' => 'ids', to your WP_Query arguments. This will speed up your query dramatically. This will only return the post id's, and this is the only thing that you actually need Use wp_get_post_terms() to get the post ...


5

If you press the "Learn More" button for each Jetpack Module, you will get a "Deactivate" button showing up to the right. There is also a fork call Jetpack Lite http://wordpress.org/extend/plugins/jetpack-lite/ A NOT official "lite" fork of Jetpack plugin containing only Stats and WP.me Shortlinks modules. All other modules removed (files and code).


5

A basic user login tracker is pretty trivial to implement. function track_user_login_wpse_100929($id,$user) { $tracking = get_user_meta($user->ID,'tracking_key_name',true); $tracking[] = time(); update_user_meta($user->ID,'tracking_key_name',$tracking); } add_action('wp_login','track_user_login_wpse_100929',1,2); After that you just need to ...


4

When you sign in, You can see tiny site stats chart(displayed in above screenshot) in your toolbar called a Sparkline. The number in Sparkline represents the highest number of visitors visited in 48 hours of day. You can find more information in wordpress.com Stats Support. I have copy pasted the content below from this link so that it will not affect ...


4

You could use Google Analytics for WordPress. Here's an excerpt from their FAQ on how you could set it to track certain file types: How can I track downloads? Check the box for "Track outbound clicks & downloads", after that, make sure the file types you want to track are listed in the box of extensions to track as downloads. You’ll find this ...


3

Using Google Analytics will only collect clicks on your web pages, it will not count hits from external sites, RSS feeds, apps, etc. For this you'll need to utilise your server log files. AWStats is good for this but it is overkill for a single file - you'd need to log in, set the timeframe to a large span, then browse for your file... it would be much ...


3

There's been some significant updates in the WordPress ecosystem since this question was asked, and I would like to clarify something about usage tracking code in plugins and themes on WordPress.org. It's completely OK if you ask permission from users. To offer a free version of my plugin on WordPress.org, I use Freemius, which offers insights and ...


3

The process to deactivate a module on Jetpack has changed. Instructions are here: Control Jetpack’s Modules on One Page Basically, you need to go to /wp-admin/admin.php?page=jetpack_modules and there you can find a Deactivate button for every module.


2

Functions to disable and remove from the settings page individual jetpack modules. function jherve_kill_monitor ( $modules ) { unset( $modules['monitor'] ); return $modules; } add_filter( 'jetpack_get_available_modules', 'jherve_kill_monitor' ); function jherve_kill_sso ( $modules ) { unset( $modules['sso'] ); return $modules; } ...


2

Google Analytics offers this feature and pretty much the way you wanted it. In GA, in the Content Section, check the AdSense subsection ... specifically the AdSense Pages report. It tells you page wise which content has generated how much revenues. And yes, these reports are exportable in CSV format which open in Excel. If I were you, I would put the ...


2

The easiest way might be to hide it using CSS. If there's a class or id unique to the container, add this to your theme's functions.php: add_action('admin_head', 'custom_admin_css_ha'); function custom_admin_css_ha() { echo '<style> #unique-id-or.unique-class-goes-here { display: none; } </style>'; }


2

Frequency table - custom SQL query: You can try the following custom query for your posts/terms statistics for a given taxonomy, post status and type: /** * Frequency data: Count how many posts have a given number of terms, * for a given post type, post status and taxonomy. * * @param string $taxonomy Taxonomy slug * @param string $post_status ...


2

Okay, so here is the complete query for displaying popular posts of current week. I am using meta_query to limit query results within current week only. It will get all posts from current week and then sort them by post views count added by custom field wpb_post_views_count that you used in your question. // Current week's popular posts $query_args = ...


2

Unless you have a "religious" objection to share data with google then using GA is just the simplest and best way to go. Storing stats in your DB is a good start if you want to bring your server down when there is slightly high traffic, and in any case you can get all the stats that you want via the GA APIS.


2

Gathering page view statistics is inherently write operation, which is inherently heavy on resources. There are no appropriate mechanisms in WP for high volume writes at low resource consumption. Your best bet is using external analytics system/service and retrieving page view data from it.


2

There are many different ways to get some stats regarding your site. One of the most popular solutions is to use Jetpack. Check this link for more info: http://jetpack.me/support/wordpress-com-stats/ Alternatively you may use a plugin such as this one: https://wordpress.org/plugins/wp-power-stats/ Another solution is to use a separate application such as ...


2

Put simply, you don't, and you shouldn't The Problems Race Conditions Make the Data Super Unreliable Updating post meta, options, terms, etc is not an atomic operation. You need to fetch the view count, add 1 to it, then send it back to the database. During that process, another page load is occuring which does the same thing, leading to the following ...


2

Here's an idea for a starting point, by looking how the word counting is done in the /wp-admin/js/post.js file: /** * Testing word price calculations */ add_action( 'after_wp_tiny_mce', function() { ?><script> ( function( $ ) { $( function() { // Init var $content = $( '#content' ), $count = $( '...


1

It's likely going to be in your themes single.php file. Perhaps check for a function call to get the number of views, and comment out the code.


1

If you have Google Analytics available, you can try out the WP Scroll Depth plugin


1

This is basic PHP string concatenation echo 'Total posts: '; $published_posts; Should be echo 'Total posts: ' . $published_posts;


1

When you want to store the data for a specific period of time, you can use the Transients API. But, this API is good for small amount of data, such as theme options or similar data. What you can do is, to store the post views normally, and then run a cron job each day and clear the views. Let's take a look at a simple example. // You update the view counts ...


1

A standard WordPress install doesn't keep track of visits to pages/posts. So without a plugin there's no way to know which posts/pages are visited most often. As to finding random posts that's as simple as: $args = array( 'post_type' => array( 'post', 'page', 'my-custom-post-type' ) 'orderby' => 'rand', ); $query = new WP_Query ($args);


1

This answer is just to put down a kind of roadmap. I think the question touches some machine learning concepts, you used the right "statistics" tag. You need to build a dictionary plugin learning from your new posts. Probably doing something like: Manually create a first json filter dataset of most used words in your language (i.g. https://...


1

It's possible but requires help from an official WordPress support person (aka "Happiness Engineer") to do it: As for stats, they can also be moved, but staff have to take care of that. Once you have Jetpack installed on the new WordPress.ORG install, post the relevant URLs in this forum thread and then add the "modlook" tag n the column on the right. * ...


1

You don't seem to call posts_count_func() anywhere, so if your transient expires, it's not getting reset. function posts_shortcode_count_func( $atts ){ $post_count = get_site_transient( 'total_posts_cache' ); if( ! $post_count ) { posts_count_func(); $post_count = get_site_transient( 'total_posts_cache' ); } return $...


1

You can use wordpress plugin Simple Login Log This plugin keeps a log of WordPress user logins. Offers user and date filtering, and export features. Important Links: 5 Handy WordPress Plugins to Track Users and Statistics Track logged in users' visits


1

add_action( 'dashboard_glance_items', 'cor_right_now_content_table_end' ); function cor_right_now_content_table_end() { $args = array( 'public' => true, '_builtin' => false ); $output = 'object'; $operator = 'and'; $post_types = get_post_types( $args, $output, $operator ); foreach ( $post_types as $post_type ) ...


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