Super Interactive
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
-
Thanks!
Forum: Plugins
In reply to: [Posts 2 Posts] Cross link several post typesOk, no idea why I haven’t thought of this before, but turns out it’s quite simple:
$post_types = array( 'post', 'custom-post-type-1', 'custom-post-type-2' ); p2p_register_connection_type( array( 'name' => 'multi_connections', 'from' => $post_types, 'to' => $post_types, 'reciprocal' => true ) );Forum: Plugins
In reply to: [W3 Total Cache] fetch_feed() breaking cachingDone!
Forum: Plugins
In reply to: [W3 Total Cache] Issue with w3tc-wp-loader.phpDoh! Thanks, I wasn’t aware.
Forum: Plugins
In reply to: [W3 Total Cache] fetch_feed() breaking cachingI created a work-around by caching the feed as a transient. So instead of:
$feed = fetch_feed( $feed_url );You would do:
// Require for dealing with feeds require_once ( ABSPATH . WPINC . '/class-feed.php' ); // Check if feed transients exists if( false === $feed = get_transient( 'foo_transient_key' ) ) { // If not, fetch it $feed = fetch_feed( $feed_url ); // Store as transient for 4 hours set_transient( 'foo_transient_key', $feed, 4*60*60 ); } // You now have an object $feed just like you did beforeNow you’ll only fetch the feed once every 4 hours, and W3TC will cache your page the rest of the time.
This seems to fix the problem. I always thought fetch_feed does its own transients/caching though. Either way, it’s still weird W3TC skips entire pages for one simple fetch.
Forum: Plugins
In reply to: [W3 Total Cache] fetch_feed() breaking cachingSame here, this has been occurring since we updated to the latest version.
Pages on one of our projects aren’t being cached when they contain a widget that uses fetch_feed.
Viewing 6 replies - 1 through 6 (of 6 total)