Log In · Register


Help Topic Rules and Requirements

For a list of all requirements and guidelines pertaining to posting a new Help topic, please click here.

This Month's Contests | Staff Member of the Month | Hosts Looking for Hostees | Hostees looking for Hosts | BigBookofResources

Submission Guidelines

Reply to this topicStart new topic
Visitors select layout.
post Jun 8 2010, 09:41 PM
Post #1


Group: Member
Posts: 15
Joined: May 2008
Member No: 645,987

I'm using Zymic which allows use of PHP.

I'm currently about to create yet another (personal) website. I want there to be an option where visitors can choose a different layout for the site, and possibly the preference would be remembered for the next time they visited.

Does anyone know the code? Or have a link that could tell me how?
post Jun 9 2010, 12:37 AM
Post #2

Mel Blanc was allergic to carrots.

Group: Official Designer
Posts: 6,371
Joined: Aug 2008
Member No: 676,291

I think you'd have to use Javascript for that. Maybe have the Javascript change the stylesheet URL to a different one when a user selects a certain theme and then set a cookie when they do, so if they refresh or go back or whatever, have the Javascript load the cookie which saved the stylesheet URL last selected.

I'm not sure about the code itself right now, because I got back from a bar and I'm awfully tired. Also, I think I'd rather use jQuery for this, if it's possible. Maybe I can post one tomorrow.
post Jul 30 2010, 09:05 PM
Post #3

Senior Member

Group: Human
Posts: 55
Joined: Jul 2010
Member No: 762,696

If you still in-need of this read here.
post Aug 1 2010, 11:51 PM
Post #4


Group: Member
Posts: 22
Joined: Dec 2008
Member No: 702,109

I don't know if that previous post by Mike helped but this might also:


It's two short screencast by Jeffrey Way that shows you how to do it using PHP in the first video and in the second video he shows you how to enhance that using jQuery.
post Aug 3 2010, 08:39 AM
Post #5


Group: Member
Posts: 1
Joined: Aug 2010
Member No: 763,052

You may also visit this link http://codex.wordpress.org/FAQ_Layout_and_Design

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: