Custom Post Type With Different Views

For example, let’s say that Property is the post type. We would like to display several different views (completed (built), for sale, and for rent.) Sure. Just make Completed, For Sale, and For Rent taxonomies for the Property post type. Look into WP_Rewrite class, too, and you can get greater control over url permalink structure.

Best pratice to make taxonomy terms translatable without changing slugs?

I’m not really up to date on WPML and how it handles translations, but my general understanding is that in most cases it simply creates duplicate entries for each language and links them together with the “original”. However, I recently hade a similar problem where I needed the ability to add a “pluralized” version of … Read more

WPML: getting page title in different language

Let’s say the original language of your site is english, then when visiting a german post you would return the title of the corresponding english post like that : // Get the post ID of original post $original_ID = icl_object_id( $post->ID, ‘post’, false, ‘en’ ); // Get original post title $original_title = get_the_title( $original_ID ); … Read more

gettext does not translate when called in ajax

it is too late but for public use: /* if qTranslate is installed */ /* set front locale for ajax calls requested from front-end */ function set_locale_for_frontend_ajax_calls() { if ( is_admin() && defined( ‘DOING_AJAX’ ) && DOING_AJAX && substr( $_SERVER[‘HTTP_REFERER’], 0, strlen( admin_url() ) ) != admin_url() ) { load_theme_textdomain( ‘your-theme-domain-name’, get_template_directory() . ‘/languages’ ); … Read more