How to add just one page in Arabic

@toscho is right about the direction of the text… But as someone who builds websites in hebrew all the time i would reccomend you create a custom page template by putting this tag in a copy of page.php /* Template name: arabic page */ THen you can design it differently… maybe remove the sidebar which … Read more

Change the Search Base in a multi language wordpress

I found the solution. I had to flush rules after I change the search base with the code on the edited question. Here is the final code: $lang = get_bloginfo(“language”); if ( $lang == ‘de-DE’ ) { add_action(‘init’, ‘search_base_german’); function search_base_german() { $search_slug = ‘suche’; // change slug name $GLOBALS[‘wp_rewrite’]->search_base = $search_slug; $GLOBALS[‘wp_rewrite’]->flush_rules(); } }

Integrate post tags in Post Edit page with qTranslate

When user starts typing something into tag input, JavaScript makes request to admin-ajax.php with action set to ajax-tag-search to receive list of suggestions (if any). In that file that action is recognized as belonging to core and wp_ajax_tag_search() function is added to dynamically generated wp_ajax_ajax-tag-search hook, which fires almost immediately after that. Looking at source … Read more

WPML Get url without outputting

Actually WordPress lacks a real function to get posts by slug/post-name. But you can use get_page_by_path() for it so you don’t have to use a custom query: if(function_exists(‘icl_object_id’)) { $post = get_page_by_path(‘your-slug’); $id = icl_object_id($post->ID,’post’,true); $link = get_permalink($id); } The only difference here is that you must use the full path i.e. (‘parent-page/sub-page’) if you … Read more

Does changing ‘WPLANG’ in wp-config.php just effect the admin language or does it have other consequences?

WPLANG effects the whole site not just the admin section, you can use it in conjunction with WPML. It basically sets what language you have translations for but you must include a languages folder inside wp-include with the appropriate .mo and .po files. You can also set WPML to use the default languages directory ( … Read more

Make a custom theme translate-ready

To do it properly, you need to generate a valid .mo file and load the text domain in your theme functions.php: function wpse222346_localize_theme() { load_theme_textdomain( ‘your_theme_domain’, get_template_directory() . ‘/languages’ ); } add_action( ‘after_setup_theme’, ‘wpse222346_localize_theme’ ); You can check the WordPress Codex for more info on the load_theme_textdomain function: https://codex.wordpress.org/Function_Reference/load_theme_textdomain Then you would call the translatable … Read more

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