WordPress.org

Forums

Conditional Themes
[resolved] Need better instructions (2 posts)

  1. neocreo
    Member
    Posted 1 year ago #

    The instructions are very unclear on how to use this plugin.
    Where should it be called, where is it used? What file is best to call it from?

    http://wordpress.org/plugins/wp-conditional-themes/

  2. Nashwan Doaqan
    Member
    Plugin Author

    Posted 1 year ago #

    Where should it be called, where is it used?

    As the plugin is for switching the themes, sure thing don't put the codes in the theme functions.php file.

    Write an another plugin file, and put this codes in:

    function my_conditional_themes_setup() {
    
    	// Switch to Twenty Eleven theme if the visitor use Internet Explorer.
    	Conditional_Themes_Manager::register( 'twentyeleven', function() {
    		global $is_IE;
    		return (bool) $is_IE;
    	} );
    
    } // end my_conditional_themes_setup()
    
    add_action( 'plugins_loaded', 'my_conditional_themes_setup', 100 );

    if you don't know how to write a plugin file, see:
    http://codex.wordpress.org/Writing_a_Plugin

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Conditional Themes
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic