I’m trying to store an image generated with imagecreatefrompng() using the Transients API, but it just stores an empty string (string(0) ""). Also, I notice if I set the...
I’m working at a WordPress theme. Since I need to display featured posts, related posts, some widgets with recent posts and so on, I need to use multiple custom...
I noticed that some transients on my site every now and then go from having an expiration date to “Does Not Expire”. I have noticed this happening with some...
I use this to display all posts in all categories. $args_cat = array( // order by category name ascending 'orderby' => 'name', 'order' => 'ASC', // get only top...
we’re using the Atlas HTML sitemap plugin, which caches the sitemap using the transients API with a call like: set_transient( 'dmac_html_sitemap', $output, 60*60*24*7 ); Now, we also have a...
My plugin requires me to save query data for some time. The data isn’t big as such; just a couple of search parameters entered by the user so that...
Haven’t worked much with XML so I’m hitting a bit of a wall: function getapi() { $api_response = wp_remote_get( "http://example.com/getXML" ); $data = wp_remote_retrieve_body( $api_response ); $output = new...
I’m working on a custom template for a new theme that uses a WP_Query instance to select posts from 2 post types with 2 custom fields that are NOT...
Im using a WordPress transient, which expires after an hour, to store a value which is an integer. Im trying to use switch() and multiple case() statements to evaluate...
This was really driving me crazy. I was debugging some code with code-generated transient names and they were failing like crazy for no apparent reason. After much much pain...