Manually add /language/ to all Wordpress URLs - wordpress

I am trying to turn a single language WP website into a multi language site, without using a plugin.
In practice I would like to manually add the language code to the page URL:
domain.com/company/ should become domain.com/en/company/
That should be applied to posts, pages, products and custom post types URLs.
So far I have tried some solutions, found here and elsewhere, without success.
Could anyone give me some hints, please?
Thank you, Paola

Related

Wordpress multilanguage URL

I'm building my own theme in WordPress, and the website will be in multiple languages.
All I need is to find a way to assign a language to each page, and this language should be added to the URL as well. (I'm guessing adding a taxonomy, but I'm not sure how to add this to the URL)
I will create a different template page per individual page. Most plugins try to translate each page, this I don't need.
Lastly, of course, I will create a separate menu per language, but these links should link to the correct page URL (with the ../language/..)?
Is there a way/ plugin that can help me do this?
Thanks a lot to all who can help me with this!

WordPress Multilingual Support for Multisite

I have one multisite with one custom post-type and multiple taxonomies and posts are generated using a third-party application.
Now I want to create a German addition site where content from the third-party application will be German and I want to show post listing with German translated strings, taxonomies, etc.
Any suggestion on how to achieve this?
If I understand correctly, I recommend using this plugin.
It works by automatically translating anything.
There are also various other options that can help you.
Link: https://pl.wordpress.org/plugins/google-language-translator/

How to disable or 404 a single page view of a custom page type of a theme in wordpress?

In my theme there are custom page types like "team". I do not want a public access to e.g. www.xyz.com/team/ or www.xyz.com/team/xyz
In both cases it "should" return a 404 error. How can this be done manually in Wordpress without using a plugin and if not possible manually then which plugin do you recommend?
I know there are plugins which can do this but they down the speed of my website too.
Oh so this technique would be the best one to use. Great. Thanks for the help.

How do I call a plugin in a custom page for wordpress?

So I am trying to do this and I don't know how. I have a wordpress powered website with a plugin called "frontier-post" in it. This plugin makes a new front-end post submission. The way to use it is to put the shortcode "[frontier-post]" in any post in my wordpress page and that page turns into this.
I want to make a custom page for myself, where I can have the content created by this plugin there too. So I do not want it to be a post in my wordpress, but lets say at a corner in the custom page. I have searched and found these but the suggestions there would not work. I am able to include the wordpress so that the custom page has access to posts, etc. but even using this
echo do_shortcode('[frontier-post]');
would not help me. (even if header is included)
These are the similar things i found:
Wordpress/PHP - How to use plugins outside wordpress-powered pages?
Need Help for my Custom Page Template
I would really appreciate it if you could help me with this.
If you are creating a PHP page that isn't going to be rendered inside WordPress, you can't use a Plugin of the WordPress engine to accomplish what you are wanting to build. (As the accepted answer to one of the pages you link to indicates).
Instead, you might be able to use the json-api plugin and have your custom page query it for the data. While it won't render the shortcode, it will give you the raw data to work with.
http://wordpress.org/plugins/json-api/
Edit:
Based on a comment, your do_shortcode should work...just try it without the square brackets.

Find a way around wordpress sitemap plugin limitations

I created a blog using wordpress in January.
Though, I use a custom template for one of my page to display custom dynamic pages. (exemple here)
Now, I use the wordpress plugin XML-Sitemap to automatically generate sitemaps.
Unsurprisingly, this plugin does not crawl the page using a custom template, and the many links within.
However, I thought that the crawlers of the major search engines would do so. But they didn’t. My custom pages are still not indexed anywhere.
So here is my question:
I have found a tool that can comprehensively crawl my website and generate a sitemap. If I use it, do I have to de-activate my wordpress pluging?
Thanks a lot!!
first of all, i'm not experienced in Word Press, but I came out with two ideas about your problem, so, if they could be useful, here are:
1) I don't think the plugin crawls the template. Instead I think the plugin generates the sitemap starting from the sitemap saved in the wordpress configuration (in drupal the sitemap and url aliases are saved in the database for example, and the sitemap plugin starts from there)
2) If your plugin generates a sitemap file (I think it does!), so you have to disable it first of use an other tool
Hope it helps!

Resources