Add language prefix to permalinks

I”m not sure if this is the “best” way to approach it but this is what I would try first. I would create a taxonomy (like categories) called languages. Maybe even use categories (if they are not in use for something else). You can structure permalinks to go example.com/<cat-name>/<page-stub> and, thus, have the language as … Read more

Save URL into database

If you have simple data, you can use add_option function to save the data to the wp_options database table. You can pass an array, it will be serialized automatically. Just pass the array to the function in the second argument, and specify the option name in the first argument (something like all_visits). And then you … Read more

How can i have a custom post type with more slugs for each post?

Yes you can do this with a custom rewrite. I am doing the same for a custom post type, in my case profile. So my URL = domain.com/profile/some-custom-slug. Dynamically I create /meet-me behind it, so it becomes domain.com/profile/some-custom-slug/meet-me. The real address of the contact page is domain.com/profile/some-custom-slug/?meet=true (or something else unique). function wpse343933_todo() { add_rewrite_rule( … Read more

How to edit URL Slug?

You can edit the slug for most content types. Check your sidebar when you have it open for editing – it should look something like this: Moreover, some SEO plugins (like Yoast) also allow you to specify a slug. If you change the slug (and thus the URL to pages) you might want to use … Read more