Disabling WP-Admin Caching in htaccess

Your hoster is wrong. no logged in user should be cached, admin side or not. This is not just an annoyance type of issue, it is an actual security problem that might cause the disclose of your passwords. Just remove the last caching line from your htaccess, it is unlikely to do you any good … Read more

Force ‘permanent’ post cache of shortcode results

You’d want to look up transients Here’s a simple example of how you do it. function showPosts (){ $posts = get_transient (“my_rss_transient”); If (!$posts){$posts=getPosts ();} /* do showing off stuff here */ } function getPosts (){ $posts = /* get posts here*/ Set_transient (“my_rss_transient”, $posts, MONTH_IN_SECONDS); return $posts } The transient should be saved for … Read more

Adding a URL Parameter to JPEG images in posts

function add_jpeg_params($content){ preg_match_all(“/https?:\/\/[^\/\s]+\/\S+\.(jpg|jpeg)/”, $content, $output_array); $items_to_replace = array_unique($output_array[0]); $items_to_replace = array_values($items_to_replace); for ($j = 0; $j < sizeof($items_to_replace); $j++) { $content = str_replace($items_to_replace[$j], $items_to_replace[$j] . ‘?t=” . time(), $content); } return $content; } add_filter(“the_content’,’add_jpeg_params’,10); add_filter(‘post_thumbnail_html’, ‘add_jpeg_params’ );

WordPress Userroles button getting cached

If this is on a specific page you’ll be able to exclude the page from being cached under Performance > Page Cache > Advanced. If it’s on every page you’ll have to enable fragment caching. Set the method to Disk: Basic and enable Late Initialization in Performance > Page Cache > Advanced. Set the following … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)