How to query the custom fields by language?

In qTranslate, there is this function that “dispatch” the language with the kind of string you have. Haven’t tested it yet, but you could do something like: $myString = get_post_meta( $post_id, ‘Functions’, true); echo qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($myMeta); This will display the right language on your post based on the current page’s language.

Sort posts by custom fields value using dropdown menu

Instead of query_posts try using WP_Query class. http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters This is example from codex: $args = array( ‘post_type’ => ‘my_custom_post_type’, ‘meta_key’ => ‘age’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’, ‘meta_query’ => array( array( ‘key’ => ‘age’, ‘value’ => array( 3, 4 ), ‘compare’ => ‘IN’, ), ), ); $query = new WP_Query( $args );

add_action and remove_action if custom field exists

I’m not clear on how your code works as-is, as I mentioned in my comment. It looks like you’re adding an action to call a function inside the function that you want to call with that action. If nothing outside the function invokes it, it never runs. add_action( ‘template_redirect’, ‘check_breadcrumb_condition’ ); function check_breadcrumb_condition(){ global $post; … Read more