admin管理员组文章数量:1129714
I need to setup a domain example
with about a thousand pages, which represent about 100 micro-sites of about 10 pages each.
The thing is that I need that there's no subdomains nor sub-folder separation.
Say that:
- pages A, B and C interlink together, but not to KLM nor XYZ.
- pages K, L and M interlink together, but not to ABC nor XYZ.
- pages X, Y and Z interlink together, but not to ABC nor KLM.
But, intentionally, there's no signal to the user about the grouping.
Question:
Is it possible to run example/page-a
, example/page-b
and example/page-c
with one theme and color settings (for example Kadence, light), then example/page-k
, example/page-l
and example/page-m
with another theme and color settings (say Understrap) and then maybe example/page-x
, example/page-y
and example/page-z
to use the same theme than ABC but with another color scheme (for example Kadence with dark theme)?
In short I want "separate microsites" from the design point of view but "mixed" from the URLs point of view.
I need to setup a domain example.com
with about a thousand pages, which represent about 100 micro-sites of about 10 pages each.
The thing is that I need that there's no subdomains nor sub-folder separation.
Say that:
- pages A, B and C interlink together, but not to KLM nor XYZ.
- pages K, L and M interlink together, but not to ABC nor XYZ.
- pages X, Y and Z interlink together, but not to ABC nor KLM.
But, intentionally, there's no signal to the user about the grouping.
Question:
Is it possible to run example.com/page-a
, example.com/page-b
and example.com/page-c
with one theme and color settings (for example Kadence, light), then example.com/page-k
, example.com/page-l
and example.com/page-m
with another theme and color settings (say Understrap) and then maybe example.com/page-x
, example.com/page-y
and example.com/page-z
to use the same theme than ABC but with another color scheme (for example Kadence with dark theme)?
In short I want "separate microsites" from the design point of view but "mixed" from the URLs point of view.
Share Improve this question asked Jul 2, 2022 at 19:21 Xavi MonteroXavi Montero 1033 bronze badges 3- Using multiple themes on a single installation is possible, but that'll be more like a hack than a solution. A cleaner way would be using different page templates for those set of pages and corresponding header and footer files for them. You can conditionally enqueue scripts and styles with that. – Abhik Commented Jul 3, 2022 at 4:01
- there are a lot of ways to achieve what you seem to want, without getting too exotic, but choosing the best way to do it would depend as much on the current state of your data, content, and design and projected site operations. Do you just mean that sets of pages will have design characteristics in common, or that literally, for visitors vs users vs site operators each "micro-site" really would work like a different site in all respects. – CK MacLeod Commented Jul 3, 2022 at 22:22
- About current satate => There's zero data at this moment. We are planning in advance and all has to be built, we don't carry old sites into this. I think what I need is the "multi-site" feature but instead of separating them by domain or path, just co-exist in the same domain and path and then make the routing to decide "this route belongs to site 33, this other route (in the same path) belongs to site 77". Similar to the path-separation native in the multi-site but without using a "path" to separate. – Xavi Montero Commented Jul 5, 2022 at 21:31
2 Answers
Reset to default 0Yes, it is possible to achieve this kind of setup in WordPress. You can use a combination of custom page templates, custom fields, and conditional logic in your theme to apply different designs and styles to specific groups of pages while maintaining a unified URL structure.
Here's a general approach you can take:
Create Custom Page Templates:
For each group of pages (A, B, C; K, L, M; X, Y, Z), create a custom page template in your theme. You can do this by creating separate PHP files in your theme directory, such as template-group-a.php, template-group-k.php, and template-group-x.php. Apply Different Themes and Styles:
In each custom page template, include the necessary HTML structure and apply the specific theme and style settings for that group. You can enqueue different stylesheets, set different colors, and customize the layout as needed. php Copy code
Assign Templates to Pages:
In the WordPress admin, when editing each page (e.g., Page A, Page K, Page X), choose the corresponding custom template from the "Page Attributes" section. Conditional Styles in Theme's CSS:
In your theme's CSS file, use conditional styles based on body classes or other identifiers to apply specific styles to pages belonging to different groups. css Copy code /* Styles for Group A / body.group-a { / Custom styles for Group A */ }
/* Styles for Group K / body.group-k { / Custom styles for Group K */ }
/* Styles for Group X / body.group-x { / Custom styles for Group X */ } Custom Fields (Optional):
You can use custom fields to store additional information about each page, such as the group it belongs to. This information can then be used in your templates or theme files to conditionally apply styles. By following this approach, you can maintain a unified URL structure while providing different designs and styles for each group of pages. Just make sure to thoroughly test your implementation to ensure that the desired themes and styles are applied correctly to each group
If you prefer a solution without coding, you might consider using a WordPress page builder plugin that allows you to create custom layouts and styles without writing code. Here's a general approach using a popular page builder called Elementor:
Install Elementor:
Install and activate the Elementor page builder plugin on your WordPress site. Create Custom Templates:
Use Elementor to create custom templates for each group of pages. You can design the layouts, styles, and colors for each group separately. Save Templates as Global:
After creating a template for a group of pages, you can save it as a global template in Elementor. This means that changes made to the template will be reflected on all pages using that template. Apply Global Templates to Pages:
Edit each page in WordPress, and from the page editor, choose the corresponding global template for the group to which the page belongs. This can be done in the Elementor settings within the page editor. Theme Styling:
For the overall theme styling, you can choose a theme that provides a good base design and is compatible with Elementor. Many themes are designed to work seamlessly with page builders. URL Structure:
As you mentioned, you want a mixed URL structure. This means that, from a URL perspective, all pages will be under the same domain (example.com), but you can use navigation menus or other elements to guide users through the different groups. Using a page builder like Elementor allows you to visually design your pages and templates without writing code. However, keep in mind that extensive customization might still require some learning and experimentation.
本文标签:
版权声明:本文标题:multisite - May I do multiple micro-sites with different themes in a single wordpress without subdirectory nor subdomain separat 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736741222a1950518.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论