How to set default values for options page

This can be done by storing a version for your plugin and check if that version exists, it means the plugin is installed and if it does not exist then you can setup default options “once only”. Check if plugin is installed, if it is not then setup default options and store a plugin version … Read more

Custom Queries – Child Categories not showing up

category__and is exclusive, so it will not work for your application, if you use tax_query and setup your query as follows, it should work: $args = array( ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘category’, ‘field’ => ‘id’, ‘terms’ => $city, //’include_children’ is true by default ), array( ‘taxonomy’ => ‘category’, //may need … Read more

Reproducing hierarchical list output from wp_list_categories(), using get_categories()

The most ideal solution for walking over the data is to use the WordPress walker class. http://codex.wordpress.org/Function_Reference/Walker_Class You won’t find many an example around the web for using it, but one was given by Scribu here. http://scribu.net/wordpress/extending-the-category-walker.html You can also look to the classes WordPress uses to extend the walker as further examples. http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/classes.php Hope … Read more

Retrieving and Storing Images Linked from Other Domains on Local Server?

@Jan: The cache images plugin: http://blog.milandinic.com/wordpress/plugins/cache-images/ helped me with this, it does not on demand replace the links but rather goes through all links but basically does the same. One note on this: when I ran it on a small blog it worked pretty well. On another blog (http://edward.de.leau.net) it did a lot of posts … Read more

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