You might have a look at the WordPress Transient API.
You should be able to store your shortcode output $total_network
with
set_transient( 'my_shortcode_cache', $total_network, WEEK_IN_SECONDS );
where WEEK_IN_SECONDS
is a built in constant equal to 604800
.
You can then fetch it with:
get_transient( 'my_shortcode_cache' );
If you need it to work network wide there exists also set_site_transient()
and get_site_transient()
.
Related Posts:
- How to Display Network Post Count?
- why the posts queried from sql is more than those showed on the page?
- How to mark every 3rd post
- Count posts within a custom post type and specific taxonomy and terms?
- How to Display a List of Users Who Have Made at Least 1 Post?
- Clear cache when a post is submitted [closed]
- Querying post from a multisite network
- Count posts in category including child categories
- How to get a post content from another wordpress blog/site?
- how to enable different number of revisions for different blogs when using WPMU?
- Count singular post views automatically
- Set font size automatically according to number of words in post
- Network wide post count (WP Multisite)
- Strange switch_to_blog() issue
- Redirect based on user post count
- Alternate custom content in the loop
- How to hook a function only when I need to delete permanently a post?
- How to share same post to multiple site in wordpress?
- How to create post in WP network using WP-CLI
- Show that current post is number X out of X
- Pull posts from another wordpress install on same server
- Show the author’s count of total amount of posts assign to a custom taxonomy term
- Double count view in archive.php
- Query posts from different categories in multisite
- posts_per_page doesnt work
- Count to how many categories a post belongs to
- Count total number across post types
- Count search results in heading
- How to hide first gallery for every post?
- Multisite – Get current post id
- Counter of posts ever posted – even deleted ones
- Display Published Posts Count for Certain Time Period
- Mixing Tweets with Posts
- How to show last post of each website of a MU wordpress in HomePage
- How to display content from the main blog on another from multisite network as it would be its own
- How can I get global $post to work for CPT and update user?
- Multisite: Can’t Post or Create Categories
- Unable to restore from backup – how to obtain old blog posts?
- Pagination with an array of post objects?
- WordPress Multisite – Create Default Post and New Category On New Site Install
- Set static page/post from another blog on same network
- Display Notification Bar on Header on Certain Post Count
- Show posts count for Categories and Tags in wp_nav_menu
- Count number of posts of current month
- How to WP_Query() from multiple blogs and order them?
- Howto show comment count by post in post?
- Is it possible to filter the main loop to exclude posts from a specific category?
- Counter is skipping post when I still want it visible [closed]
- How do I show posts from another wordpress installation?
- Display password protected posts to logged in users
- Count several post tags
- Get post number both in the loop and in the post
- How do I insert a after every 5 posts in a WordPress Loop that infinitely loads posts?
- Count the number of a post types associated with another post type
- What will be the best caching system for wordpress blog which has more than one million blog posts? [closed]
- Change Author Name to Sitename on Frontend
- Echo the number of posts being displayed
- Display amount of pending posts in back/front end
- Cannot select certain authors for posts after import
- Count user posts and store the number for later use
- Prevent duplicate pages from being added
- Actions to use when flushing cache (when posts are added / deleted / modified)
- Count the total views of all user posts published
- Updates are not showing to public (New Posts , Theme Change)
- unable to write to the database while uploading images
- Author post count in category
- Set post title font size automatically according to number of words in post title
- Displaying all posts from other sites on the network on one site
- Multisite how to display merged posts from two sites and sort by latest date?
- Count singular post views automatically
- How to count posts in tags within time limit
- Multisite Issue on Subdomain’s article pages
- Display Custom Post Category Count & WordPress Category Count Using Shortcode
- Counting Posts by Category
- Populate a drop down list with post titles across a multisite network
- Display number of post published every day
- Retrieve posts inside foundation tabs and tab-content split by 3 per row
- Alternative content between posts no repetition
- count_posts to a standalone link
- How to control Post view count incresing in sidebar widget posts too?
- How can I have the posts from one word press blog show on the presentation page of another word press site
- Post not showing up sometimes on website
- How to get posts from network blog
- Page updates appear in Preview but not live version?
- Sorting Posts by Date – get_blogs_of_user_id()
- Add a minimum word count to Excerpt (and how to force Excerpt as a rule for WyPiekacz)
- Users cannot post when editor or admin on more than 1 site on multisite
- How to link two news page multilingual press
- Get image paths from RSS feeds
- making a few sites in wordpress
- How to limit the number of posts a user can publish based on user type
- ho can I get the number of the current post instead of the post id?
- post_count not working
- Adding Count Post in Page
- Count words for all posts by all authors
- Word count for all posts of all authors
- Do I need to create a multisite for querying posts from multiple WordPress sites?
- Display post count on archive page in reverse order
- Site ‘Categories’: save an admin global setting with post metadata [closed]
- users followin the blog post author