Answer the question
In order to leave comments, you need to log in
How to implement regional divisions in WP?
Hello. I continue to study the functionality of WP.
It is necessary to rank the site in different regions.
There are two ways, these are subdomains and subfolders
spb.site.ru
ekb.site.ru
site.ru/sbp/site.ru/ekb/ What
would
you advise to solve this problem on WP?
Answer the question
In order to leave comments, you need to log in
if you need completely different sites for a different region, or for different regions the site structure will change very much - use a multisite, or put one site for each region.
if only the phone/contact information/news output heading changes, the following algorithm will do:
link the spb.site.ru domain to site.ru/sbp/ (or use site.ru/sbp/ right away)
in the CNC rules (you can add rules to htaccess , it is possible in WordPress) we set the correspondence site.ru/sbp/ = site.ru/?region=sbp
on the site we catch the presence of region in the request
, depending on the value, we show the desired category / phone
code example, how it works, you can take from this plugin
https://wordpress.org/plugins/qtranslate-x/
it will be even easier to fix this plugin than to write a new one from scratch
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question