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

Combine multiple words in custom meta search query

Split the search query by white space and change ‘compare’ to ‘IN’ to be able to use meta values array: <?php $s = get_search_query(); $s_array = explode( ‘ ‘, $s ); // search query array $args = array( ‘post_type’ = > ‘product’, ‘meta_query’ = > array( ‘relation’ => ‘OR’, array( ‘key’ => ‘vbs_author’, ‘value’ => … Read more

Show attribute description when filtering by that attribute

You need to check when filter is enabled and take selected attribute taxonomy, ‘pa_brand’ in this case: add_action( ‘woocommerce_before_shop_loop’, ‘desc_before’, 75 ); function desc_before() { if (is_filtered()) { $brands = WC_Query::get_layered_nav_chosen_attributes() [‘pa_brand’]; if ( isset($brands) ) { foreach ($brands[‘terms’] as $term ) { $term_obj = get_term_by(‘slug’, $term, ‘pa_brand’); echo ‘<div class=”ka-attr-description”>’. ‘<h4>’ . $term_obj ->name … Read more

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