• I use polylang on my site. Url is something like the following form: http://site.com/category/news for english and http://site.com/ru/category/localized_name for other languages. It’s work fine.
    I want to remove ‘category’ form url. I downloaded and installed WP No Category Bass plugin. Its work fine on base language, but on other laguages no select posts by category. I see all post for selected language. Help please.

    Small fixes for your code:

    // meta in the html head section
    	function wp_head() {
    		// outputs references to translated pages (if exists) in the html head section
    		foreach ($this->get_languages_list() as $language) {
    			if ($language->slug != $this->curlang->slug && $url = $this->get_translation_url($language))
                                //!Ad >> $url may be error object
                                if (is_string($url))
                                // << !Ad
    				printf("<link hreflang='%s' href='%s' rel='alternate' />\n", esc_attr($language->slug), esc_url($url));
    		}
    	}

    http://wordpress.org/extend/plugins/polylang/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Remove category from url’ is closed to new replies.