Keeping Objects in Memory

This is a perfect use case for Transients. In WordPress, transients are short-lived data objects. By default, they’re persisted to the database using WordPress’ built-in WP_Object_Cache object. However, you can use a variety of caching plugins (Batcache is an outstanding one that works with Memcached) to store Transients in memory. To set a transient, call … Read more

Cannot add version of main.css to wordpress on testing enviroment

To answer the question why you can’t add the theme’s version to your CSS file, it’s likely because the Version property of $theme is private so you cannot access it directly, but you can access it through the public get function. Try this instead: $theme = wp_get_theme(); define(‘THEME_VERSION’, $theme->get(‘Version’)); You also don’t need to add … Read more

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