Post and Page Inheritance to subsites in a WordPress Network

R, the simple solution is to create a 2 post-meta. The first is “Blog id” The second is “Post id” and you use $blog_id = get_post_custom_values(‘blog_id’); $post_id = get_post_custom_values(‘post_id’); if( !empty( $blog_id ) ) switch_to_blog( $blog_id ); $query = new WP_Query( array( ‘p’ => $post_id )); if( $query->have_posts() ){ while( $query->have_post() ){ $query->the_post(); } } … Read more

Different back-end language for different users?

We could try to filter the WPLANG option locale (see e.g. this approach from the related list here on the right by @brasofilo, that’s based on this one by @toscho ): /** * Override locale settings for the current (non-admin) user */ is_admin() && add_filter( ‘locale’, function( $locale ) { // Modify locale for non-admins … Read more

How to debug failed load_theme_textdomain()?

load_theme_textdomain() returns TRUE on success and FALSE if no file was found. For debugging try the following change: function my_theme_setup(){ $path = get_template_directory() . ‘/languages’; $result = load_theme_textdomain(‘my_theme’, $path ); if ( $result ) return; $locale = apply_filters( ‘theme_locale’, get_locale(), ‘my_theme’ ); die( “Could not find $path/$locale.mo.” ); }

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