Taxonomy page wpml dropdown not working

The default language selector is pretty crap TBH. I created this function using jQuery, you will have to amend to fit your template. function language_selector(){ $languages = icl_get_languages(‘skip_missing=0&orderby=code’); $current_lang = ICL_LANGUAGE_CODE; if(!empty($languages)) { ?> <div id=”language_list”> <div class=”current”> <img src=”https://wordpress.stackexchange.com/questions/95978/<?php bloginfo(“url’); ?>/wp-content/plugins/sitepress-multilingual-cms/res/flags/<?php echo ICL_LANGUAGE_CODE; ?>.png” alt=”<?php echo ICL_LANGUAGE_NAME; ?>” /> <?php echo ICL_LANGUAGE_NAME; ?> <i … Read more

Sorting past events by month

Using query_posts is pretty much always a bad idea as it causes another database query but it also will break pagination and can cause other issues as well. What you need it a filter on pre_get_posts. function pgp($qry) { if (!is_admin() && is_main_query() && $qry->is_category(3709)) { $qry->set(‘orderby’,’meta_value’); $qry->set(‘meta_key’,’Deadline’); //formatted YYYYMMDD $qry->set(‘ignore_sticky_posts’,true); } return $qry; } … Read more

Extract post category except one category

You can simply loop over the categories that you don’t need. get_the_category() return an array of categories that the post belongs to. With that in mind, you can do the following: (Just remember to change 21 and 41 to your desired ID’s) $categories = get_the_category(); foreach ( $categories as $category ) { if( 21 === … Read more

Can’t filter categories using isotope

Try to prevent the default behaviour of the click event using jQuery right from the beginning: jQuery(function ($) { var $container = $(‘#isotope-list’); //The ID for the list with all the blog posts var $isotope = $container.isotope({ //Isotope options, ‘item’ matches the class in the PHP itemSelector : ‘.item’, layoutMode : ‘masonry’ }); //Add the … Read more

Get categories by title descendant

If only you could use get_categories() reference in the Codex, you could see that this function supports arguments. <?php $categories = get_categories( array( ‘orderby’ => ‘name’, // default value, can omit it ‘order’ => ‘DESC’ )); foreach($categories as $cat) { // your code goes here }

Remove “All categories” from searchbar dropdown

This list can be modified using WooCommerce filters. However, without a thorough testing I could not find a specific filter to help you. You might check the API for a better answer. Meanwhile, I have used this CSS snippet to successfully hide the “All Categories” entry from the drop-down selector: li.option[data-value=””] { display: none; } … Read more

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