WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Theme switcher plugin breaks theme editor (7 posts)

  1. Starkmann
    Member
    Posted 7 years ago #

    I didn't know if this should go in plugins or troubleshooting.
    I downloaded Theme Switcher based on some other conversations here at wp.org. As long as I have the theme switcher turned on:
    http://wp-plugins.net/index.php?filter=theme+switcher&filter_search=Go...
    I seem to be unable to edit any theme from within the Admin area, when I click on the sidebar or other file, it bounces me out to the front page of my blog.
    If I put the bit of code in the sidebar that needs to be there for the theme editor then turn the editor on from within the admin area, the plugin works, it's just that I can't edit other themes. So anytime I found a new theme to throw in. I would have to turn it off, edit the editor window into the theme, then turn it on.

    So, the questions:
    Am I doing something obviously wrong?
    Does someone have this plugin who is not having this issue?
    Is there a way to add the dropdown window into the overall template that would stay in place no matter what theme you go to?

    Thanks very much.

  2. moshu
    Member
    Posted 7 years ago #

    Starting from the end...
    Is there a way to add the dropdown window into the overall template that would stay in place no matter what theme you go to?

    No, there isn't.

    Which theme switcher? I've seen more than one...

    (I never edit template files in the online editor - as other mortals, I tend to forget to change the permissions back, leaving the whole install wide open for any hacker idiot)

  3. Starkmann
    Member
    Posted 7 years ago #

    mm, good point on permission. I may have to rethink that bit. In the mean time, I'm using the top theme switcher from the link in my post. It is claimed to be authored by one Mr. Peer. I tried to look into the file for a bit more clarification but all I get is that it comes froma 386a.net. If you know of one that works and well, I'd be more than happy to cash this one in for another.

  4. moshu
    Member
    Posted 7 years ago #

    I know about this one:
    http://dev.wp-plugins.org/wiki/ThemeSwitcher
    but I didn't use it for a long time. Try it. This one is by Ryan Boren.

  5. Starkmann
    Member
    Posted 7 years ago #

    I have downloaded it, I will get back to you.

    EDIT: interesting results so far. It works, but displays all thethemes in my libray. In th event I turn it offbut don't comment out the code, it stops the background image on my page. It'll be usable after I have cleaned up my thme library.

  6. moshu
    Member
    Posted 7 years ago #

    1. That's the idea: it displays all the existing tehems and visitors can pick one. Due to the cookies your blog will remember what was the selected theme for ABC user and it will show your blog "dressed" like that.
    2. Use this little code always for plugin tags - so that in case of deactivating they don't break your blog:
    <?php if (function_exists('wp_theme_switcher')) { ?>
    <li><h2><?php _e('Themes'); ?></h2>
    <?php wp_theme_switcher(); ?>
    </li>
    <?php } ?>

    or whatever is appropiate for your design. The main thing is the first and last line!

  7. Starkmann
    Member
    Posted 7 years ago #

    Thanks for the bit of code. I will add that.
    The reason I thought it was odd that it showed them all was because the first plugin I was using actually had a nice little feature that allowed me to select which themes were viewable. So if I had, for example, a black and white version of the same theme but wanted to add a grey one. I could add it to my theme library, work it over a bit. Then add it to the drop down.
    I may play around with some different theme selectors out there.

    Thanks again for the code though, that will be very useful

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.