I apologize in advance for not having very many examples of effort already put into solving this. I've been googling and racking my brain but I can't even begin to visualize how this should be done.
We have a WordPress site with a Woocommerce store. To put it simply, we will be selling products for various resorts, and each resort will have their own product category to keep everything separate. So for instance if someone goes to https://www.oursite.com/resort-1, it'll be a page with all of Resort 1's products. This is all fine and good.
The problem: for each resort, we also have iPad kiosks that will use Kiosk Pro to display each resort's products and allow them to be purchased. These kiosk versions of the site must be accessible via a subdomain, e.g. https://resort-1.oursite.com. These subdomain versions should start with a landing page, then lead to the expected product listing but with a slightly different look (all via css).
My questions:
How can I set up a subdomain to lead to a specific page without using a multisite?
How can I adjust all links on each page so if someone starts on the kiosk subdomain, they'll stay on the kiosk version no matter where they navigate to?
It strikes me that one way to accomplish this would be to:
a) use htaccess to route to a page with the subdomain passed as a var, for example subdomain.domain.com/page to domain.com/page?sd=subdomain
Mod Rewrite Subdomain to PHP with GET variable
Sub-domain as variable in mod_rewrite
and then;
b) include code in your theme if (sd = sudomain ) {do_something()} where do something uses a different style.css and modifies any html within the page as desired.
Related
I want to add a plugin to a live site, but I suspect the pages it creates will need some tweaks. I'd prefer users not be able to access these pages.
I realize I can just hide these page links, but I'd prefer to also have them inaccessible even if the user knows the URL.
How can this be accomplished through .htaccess for numerous Wordpress-generated pages, to disallow all but allow a couple IPs access?
The code I've come across are for directories/explicit files and doesn't seem to work when substituting in the /wordpress-page/ slug name.
Well you don't just want to hide the pages, you also need it to not appear in searches, on category pages etc. So you really need something that works within WordPress. Hiding the pages by IP would only hide the page itself, it would still appear in other areas of the site.
The best way to do this is probably the WordPress visibility feature. It's a core feature so no plugin required. Just set the visibility to private on all the pages and only admins will be able to view them. See the link for more info.
Private – Pages are only visible to blog Editors and Administrators.
Private pages are not visible in the Reader, feeds, or in any search.
A page can be private without being password protected.
I'm migrating a website that has a custom CMS to Wordpress. We're talking about a giant site with thousands of posts.
At the moment I'm at the stage where I extract the content in JSON files by category and then insert them to the Wordpress DB via MySQL. I've even moved all the images and adjusted the URL using the PHP script.
However, my problem is with links inside the content. Some link to external sites (not a problem), while others link to other posts in the old site. How can I take those links and link to the correct, new Wordpress URL?
My link structure ideally would be /category/post/ in Wordpress. The old structure is similar, except the post URL is sometimes different by a few characters to the one coming out of Wordpress. It's not necessarily "post-title-is-the-url", sometimes it has a suffix like "_2". How do I go around the problem with the suffixes?
I’ve been experiencing a problem that I was hoping someone could point me in the right direction. In an effort to make my website more mobile friendly, I purchased a mobile responsive theme. While I know I could have created a sub-domain or a directory to house the mobile version of the website, I’ve been attempting to have the original domain http://example.com switch themes based on the user. In other words, for http://example.com, Desktop user views DesktopTheme and Mobile user views MobileTheme. With the Any Mobile Theme Switcher plugin, I was able to accomplish this will little issue. However, for certain pages I would like to be able to display the desktop version to the mobile user. For example, for single posts, I would like the desktop user and the mobile user both to see the DesktopTheme.
Unfortunately, after several hours of searching and experimenting I am not further along than when I started. Using different templates appeared to be an option, but it’s not a true theme switch. When I altered the template files, mobile users received a hybrid version of the site that includes the mobile header and an unstructured version of the desktop version. A similar result was achieved when I simply copied the single.php file from DesktopTheme into the folder for MobileTheme.
Example:
<?php get_header('/var/www/html/wp-content/themes/DesktopTheme/header.php'); ?>
Any ideas?
There is a plugin that you can use for switching themes based on the post type as well as a lot of other conditions:
http://codecanyon.net/item/wordpress-theme-switcher/558740
I'm not aware of any free version that offers the same functionality, but that doesn't mean one doesn't exist.
With that said, I think you should reconsider your approach here. The entire point of responsive design is so you do not have to have separate mobile and desktop sites. I think you should sidestep this entire issue by using the responsive theme everywhere.
Using a single responsive theme is going to make maintenance much easier and give the user a more consistent experience.
Also, get_header is meant to load a header file from the current theme. You can't load components from other themes and expect them to work correctly.
I've got a wordpress website, but I'd like it to also work in a way where I can add other, non-wordpress pages and assess them like a normal website. In my case, I have a page in the root of my FTP account: http://puu.sh/3IdDY.png In this case, I want to be able to go to www.labtec901.com/admin.php, which I think I should be able to do, without wordpress coming up and saying it can't find the page: http://puu.sh/3IdI0.png
I am in a critical condition. I was paying a developer in India who left the project but now I need to access the php pages.
I have explored the joomla site using the admin login but i can't find how he is displaying the html/php pages.
Please help!
I assume you're looking for the front-end template for the website.
Using FTP or whatever control panel go to the Joomla folder, look for a folder called templates - it should be one of the folders in there.
To check what the name of the current template is, go to the admin panel and look in the template menu.
If your developer has also made any custom components, the front-end part would be somewhere in the components folder, and the backend bit would be in administrator->components.
You need to read some Joomla tutorials. There are many places that can be used to "display the html/php".
First you have the template files that determine how the site looks and what module positions are available to be used. Generally there is one template in use but there can be multiples.
Next you will have components where the content is entered. At a minimum it is likely that you are using the com_content (articles/categories) and it is very likely there are others being used.
You will also have various modules that will display content in areas outside of the main content area. This will generally include menus, login forms, and other similar content.
Last, plugins can also have an effect on the content. In some cases plugins inject content and in others they replace placeholders with content.
There are a lot of pieces to the puzzle that all come together to display the resulting web page, it's not just a simple question of accessing some files.