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

Custom sidebar category listing?

You can skip categories that have parent in your loop: foreach($category_list as $category) { if( ‘0’ != $category->parent ) continue; I’ve looked through the source, but it seems depth is only taken in account in wp_list_categories() and you will probably need to extend Walker_Category class to custom walker there to make changes to output. Actually, … Read more

How to hide WordPress files / structure? [closed]

If you are new to php and mod_rewrite i suggest so you check with the section of my response. Or if you keen to try it yourself, you can use something like this to hide the wp-content/plugins path structure: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^modules/(.*) /wp-content/plugins/$1 [L,QSA] </IfModule> This will change the path to /modules … Read more

Allow Users to Set Password During Registration

Well, you can create your own login form which I´ve have done also few years ago, but it is easier to do it with a plugin. there are a lot of these plugins, for example: Auto login new user https://wordpress.org/plugins/auto-login-new-user-after-registration/; also you can add social login to your WordPress, this creates an automatic registration on … Read more