Forums

[resolved] WordPress themes gallery (2 posts)

  1. Avram
    Member
    Posted 3 years ago #

    Hello,

    I need to use WordPress to make WordPress themes gallery website, which means, when anyone opens website it will display theme which is defined in wp settings, but if visitor opens website via e.g. http://www.website.com/?theme=classic - it should display classic theme (wp-content/themes/classic). I have edited wp-includes/theme.php and replaced every get_option('template'); with get_template(); and then I have modified get_template() function so this is how it looks now:

    function get_template() {
    	$template = (isset($_GET['theme'])) ? $_GET['theme'] : get_option('template');
    	return apply_filters('template', $template);
    }

    Now, when I open http://www.website.com/?theme=classic it changes layout but old theme is still displayed.

    I'm testing this on my website so you can take a look: http://www.avramovic.info and http://www.avramovic.info/?theme=classic
    Also, http://www.avramovic.info/?theme=default causes PHP error. I don't know which files I need to edit except wp-includes/theme.php to make this work (or, is there any plugin which will provide such functionality?).

    Any ideas?

    Thanks,
    Nemanja

  2. Avram
    Member
    Posted 3 years ago #

    Never mind, I have found this plug in, which, among other things, allows users to change theme via URL parameter: http://wordpress.org/extend/plugins/theme-test-drive/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.