WordPress.org

Ready to get started?Download WordPress

Forums

Adding Theme Switcher to a Menubar (2 posts)

  1. pilkster
    Member
    Posted 7 years ago #

    I have a blog with many themes and I wish to add a theme switcher without editing each theme, also I do not wish to use the meta hook method of adding it, I want to add it into a bar above the blog.

    If you look at a site like engadget.com, they have a bar running across the top of their screen & I want something similar for my theme switcher.

    Could someone advise which hook I should use to output this information to the browser before WP creates the page? So far I have got something like working with the footer hook and the theme switcher I found here: http://dev.wp-plugins.org/wiki/ThemeSwitcher

    <?php
    /*
    Plugin Name: Switcher
    Plugin URI: http://Themey.com/
    Description: meh
    Author: Simon Pilkington
    Version: 0.001
    Author URI: http://pilkster.com
    */
    function switcher_wp_footer()
    {
    echo '<div style="border: medium none ; margin: 0pt 0pt 0pt -163px; padding: 0pt; overflow: visible; position: absolute; left: 100%; top: 0px; height: 10px; width: 50px; z-index: 1000000000; float: none">';
    echo wp_theme_switcher('dropdown');
    echo '</div>';
    }
    add_action('wp_footer', 'switcher_wp_footer');
    ?>

    As you can see at http://themey.com

    Thanks in advance :)

  2. pilkster
    Member
    Posted 7 years ago #

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags